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

Send and receive json messages with nighthawk #810

Open
MichalzDev opened this issue Feb 22, 2022 · 3 comments
Open

Send and receive json messages with nighthawk #810

MichalzDev opened this issue Feb 22, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@MichalzDev
Copy link

Hi, Is there a way to POST and GET requests with json as a body ?
Something like running nigthawk client with:
--request-method POST --request-header 'Content-Type: application/json' and --request-body '{foo: bar}'
I see in Readme there is only --request-body-size that is int.
Same thing for nighthawk server is there a way to get json or other message instead of multiple a's ?
Thanks :)

@MichalzDev MichalzDev added the bug Something isn't working label Feb 22, 2022
@mum4k mum4k added enhancement New feature or request and removed bug Something isn't working labels Feb 22, 2022
@mum4k
Copy link
Collaborator

mum4k commented Feb 22, 2022

Hi @MichalzDev as of now we don't have support for setting the request body, but I do agree that this would be an interesting feature to add.

We have a plan to work on this, but nothing concrete yet. I will update this issue if we get to implementing this feature.

@MichalzDev
Copy link
Author

Hi @mum4k. Just to clarify, from server side setting option like response body is also not available ?

@mum4k
Copy link
Collaborator

mum4k commented Feb 24, 2022

@MichalzDev that is correct, both the client and the server currently just send the response_body_size times the a character. Here is the server portion.

With that said, adding a support for a custom response body is fairly trivial in both the client and the server. We do plan adding it into the client and a contribution to the server side would also be welcome if you are interested.

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

No branches or pull requests

2 participants