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

Vegeta attack should accept targets in cURL format #621

Open
krishna15898 opened this issue May 31, 2023 · 0 comments
Open

Vegeta attack should accept targets in cURL format #621

krishna15898 opened this issue May 31, 2023 · 0 comments

Comments

@krishna15898
Copy link

krishna15898 commented May 31, 2023

Proposal

Sending load via vegeta using the HTTP request in cURL format rather than writing it in the json or http formats as defined in the usage manual. This could be using the -targets flag pointing to a file which contains the request in the cURL format (and curl as an addition to the possible options for the -format flag).

An example of contents of a target file containing the request in the curl format -

curl -i -H "Accept: application/json" -H "Content-Type: application/json" -X GET http://hostname/resource
curl --data "param1=value1&param2=value2" POST http://hostname/resource

The target files containing requests in cURL format can also have rules about having comments after a # or post requests being able to refer to @/path/to/body.json for their request bodies like vegeta currently does for files in the http format.

Background

More often than not, we have HTTP requests in cURL format, but when sending those requests via vegeta, we have to change the format to the ones specified by Vegeta (either json or http). If vegeta accepted requests in cURL format and converted them to vegeta format internally, that would be very helpful.

Workarounds

None that I am aware of.

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