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

Add JSON support #13

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Add JSON support #13

wants to merge 2 commits into from

Conversation

dbalabka
Copy link
Contributor

@dbalabka dbalabka commented Jul 4, 2022

No description provided.

@jaygooby
Copy link
Owner

jaygooby commented Jul 4, 2022

Thanks for your PR - I'm not going to merge it at the moment, because I think a better way of handling this (and other options that are really just custom options to pass to curl) is #9

I've just pushed up that -o option, but I understand that having a bit of syntactic sugar is nice too. Let me have a think...

@jaygooby
Copy link
Owner

jaygooby commented Jul 6, 2022

👋 Can I ask what it is that you're testing with this, because there are really two changes - the first is that you're measuring TTFB from a POST request and the second is that the payload is JSON.

Currently we only support GET requests, so it's not an unreasonable change...

@dbalabka
Copy link
Contributor Author

dbalabka commented Jul 7, 2022

@jaygooby, thanks for the quick reply! 😃 In my case, I would like to measure performance changes in REST API. As you might know, when we would like to send a JSON payload, we have to use the POST method. When we are providing a payload with -d flag, cURL changes the method to POST, the reason is that most of the server's implementations accept payload only with the POST method even if an endpoint is designed to read the data (similarly to GET method). So, IMO providing an option to send a payload in JSON format would be a handful for developers in case to test read-only endpoints which require such input.

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

Successfully merging this pull request may close these issues.

2 participants