Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Binary message not the same as documentation? #1147

Open
lancechant opened this issue Apr 12, 2024 · 0 comments
Open

Binary message not the same as documentation? #1147

lancechant opened this issue Apr 12, 2024 · 0 comments

Comments

@lancechant
Copy link

Citrus Version
4.1.1

Question
Is the documentation wrong with sending byte messages or any other type other than string?

What I've tried so far
Tried to send a message with the type of BINARY and expected the message to not be text but a byte type, but instead the message was delivered as TEXT

Additional information
According to the documentation it should be as simple as doing the following:

send("someEndpoint")
    .message()
    .type(MessageType.BINARY)
    .body("Hello World")

But after spending a few days I found out for sending you have to actually do this (Well it at least gave me the results I need):

send("someEndpoint")
    .message()
    .type(MessageType.BINARY)
    .body("Hello World")
    .process(toBinary().encoding(StandardCharsets.UTF_8))

I found this here: citrus-samples

The documentation where it shows it's just as easy as setting the type: reference-documentation
samples-binary

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant