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

Render specific status codes (issue: #519) #534

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

Conversation

xt-riot
Copy link

@xt-riot xt-riot commented Jan 14, 2025

In response to #519

Added the optional argument renderOnlyStatusCode. This argument needs the renderStatusCodes to be set. validate.js takes the value of the argument and creates an array(by either splitting the value, which handles multiple comma-separated status codes, or just using the single code supplied)

Usage

node ./autocannon.js -c 1 -d 2 --renderStatusCodes "http://localhost:3000/test3"

Screenshot 2025-01-14 at 8 20 39 PM

node ./autocannon.js -c 1 -d 2 --renderOnlyStatusCode=404 --renderStatusCodes "http://localhost:3000/test3"

Screenshot 2025-01-14 at 8 20 59 PM

node ./autocannon.js -c 1 -d 2 --renderOnlyStatusCode=200,302 --renderStatusCodes "http://localhost:3000/test3"

Screenshot 2025-01-14 at 8 21 08 PM

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.

1 participant