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 --status-codes, --exclude-codes flag #406

Merged
merged 9 commits into from
Sep 22, 2024
Merged

Conversation

ksg97031
Copy link
Member

@ksg97031 ksg97031 commented Sep 21, 2024

Resolve: #397

Examples

Command 1:
$ crystal run src/noir.cr -- -b ../spring-demo -u http://172.30.1.15:8080 --status-codes
image

Command 2:
$ crystal run src/noir.cr -- -b ../spring-demo -u http://172.30.1.15:8080 --exclude-codes 400
image

Error Cases

Without URL option:
$ crystal run src/noir.cr -- -b ../spring-demo --status-codes
$ crystal run src/noir.cr -- -b ../spring-demo --exclude-codes
image

Invalid exclude codes:
$ crystal run src/noir.cr -- -b ../spring-demo -u http://172.30.1.15:8080 --exclude-codes aaa
image

Server doesn't respond:
$ crystal run src/noir.cr -- -b ../spring-demo -u http://127.0.0.1:8081 --status-codes
image

@ksg97031 ksg97031 self-assigned this Sep 21, 2024
@github-actions github-actions bot added 📑 documentation Improvements or additions to documentation 📦 output-builder Issue for output builder (format) ⚙️ options Issue for options (flag) ⛱️ config Issue for Configuration labels Sep 21, 2024
@ksg97031 ksg97031 changed the title Add --show-status flag Add --show-status, --exclude-status flag Sep 21, 2024
@ksg97031 ksg97031 changed the title Add --show-status, --exclude-status flag Add --status-code, --exclude-codes flag Sep 22, 2024
@ksg97031 ksg97031 changed the title Add --status-code, --exclude-codes flag Add --status-codes, --exclude-codes flag Sep 22, 2024
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Color:

  • 1xx: light_green
  • 2xx: light_green
  • 3xx: cyan (yellow is already used for endpoint URLs)
  • 4xx: light_red
  • 5xx: light_magenta

@ksg97031 ksg97031 merged commit 2eb09d5 into dev Sep 22, 2024
9 checks passed
@ksg97031 ksg97031 deleted the feature/endpoint-status-codes branch September 22, 2024 06:59
@hahwul hahwul added this to the v0.18.0 milestone Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⛱️ config Issue for Configuration 📑 documentation Improvements or additions to documentation ⚙️ options Issue for options (flag) 📦 output-builder Issue for output builder (format)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants