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

How to send a data section from rhea-promise #71

Open
loicmathieu opened this issue Sep 8, 2020 · 2 comments
Open

How to send a data section from rhea-promise #71

loicmathieu opened this issue Sep 8, 2020 · 2 comments

Comments

@loicmathieu
Copy link

Describe the bug
Sending a data section from rhea is documented here: https://github.com/amqp/rhea/blob/master/examples/send_raw.js#L36

But there is no documentation for how to do it from rhea-promise.

So the question is how to create a data section on rhea-promise then I'll be happy to send a PR to document it ;)

@loicmathieu
Copy link
Author

I find how to dot it.

We need to import message then define our message like this

        const msg: Message = {
            content_type: "application/json",
            body: message.data_section(new Buffer(JSON.stringify(user), "utf8")) 
        };

I can add this to the documentation or close the issue ...

@ramya-rao-a
Copy link
Collaborator

Hey @loicmathieu

I think it is worth documenting any changes that is done here that does not align exactly with rhea

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

2 participants