https://github.com/testainers/check
Check the web effortlessly: your Dart CLI for HTTP requests.
https://github.com/testainers/check
Last synced: 21 days ago
JSON representation
Check the web effortlessly: your Dart CLI for HTTP requests.
- Host: GitHub
- URL: https://github.com/testainers/check
- Owner: testainers
- License: mit
- Created: 2024-02-13T21:51:31.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2026-01-11T19:22:38.000Z (3 months ago)
- Last Synced: 2026-01-11T21:31:52.229Z (3 months ago)
- Language: Dart
- Size: 102 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
check
[](https://github.com/testainers/check/stargazers)
[](https://github.com/testainers/check/releases/latest)
[](https://github.com/testainers/check/blob/main/LICENSE)
[](https://github.com/testainers/check/releases/latest)
[](https://testainers.github.io/check/coverage/)
Introducing "Check", our CLI HTTP Request tool engineered to simplify and
expedite your web interactions. With its user-friendly commands and
comprehensive features, Check empowers users to seamlessly navigate HTTP
requests for tasks like API testing, data retrieval, and web development. Say
farewell to cumbersome setups and clunky interfaces; Check prioritizes intuitive
usability without sacrificing functionality. Whether you're a seasoned developer
or just dipping your toes into web technologies, Check is your dependable
companion for confidently mastering the intricacies of web requests.
## Funding
Your contribution will help drive the development of quality tools for the
Flutter and Dart developer community. Any amount will be appreciated.
Thank you for your continued support!
[](https://www.buymeacoffee.com/edufolly)
## PIX
Sua contribuição ajudará a impulsionar o desenvolvimento de ferramentas de
qualidade para a comunidade de desenvolvedores Flutter e Dart. Qualquer quantia
será apreciada.
Obrigado pelo seu apoio contínuo!
[](https://nubank.com.br/pagar/2bt2q/RBr4Szfuwr)
## Download
```shell
curl -sSLO https://github.com/testainers/check/releases/latest/download/check
chmod a+x check
sudo mv check /usr/local/bin
```
## Examples
Check http://localhost:8080 with GET method.
```shell
check :8080
```
Check http://localhost:8080 with POST method.
```shell
check POST :8080
```
Check http://localhost:8080 with GET method and timeout to 5 seconds.
```shell
check -t 5 GET :8080
```
Add `check` directly from dockerfile.
```dockerfile
ADD https://github.com/testainers/check/releases/latest/download/check \
/usr/bin/check
RUN chmod +x /usr/bin/check
```
Docker HEALTHCHECK example:
```dockerfile
HEALTHCHECK --start-period=5s --interval=15s --timeout=10s --retries=3 \
CMD check :8081/api/health || exit 1
```
### Exit Codes
The exit codes in the range from 1 to 8 are reserved for specific application
purposes.
If the HTTP request returns a status code below 200, the exit code will be set
to 9.
For HTTP request status codes falling within the range of 200 to 299, the exit
code will be set to 0, indicating a successful request.
For status codes from 300 onwards, subtract 290 from the status code to
determine the exit code.
Any HTTP request code exceeding 545 will result in an exit code of 255,
indicating an error condition beyond the tool's handling capability.
| Request Status Code | Exit Code |
|---------------------|-----------|
| 0 - 199 | 9 |
| 200 - 299 | 0 |
| 300 | 10 |
| 301 | 11 |
| 302 | 12 |
| 389 | 99 |
| 390 | 100 |
| 399 | 109 |
| 400 | 110 |
| 401 | 111 |
| 403 | 113 |
| 404 | 114 |
| 500 | 210 |
| 544 | 254 |
| 545 | 255 |
| 599 | 255 |
To check the status code, visit:
https://developer.mozilla.org/en-US/docs/Web/HTTP/Status
To get the request status code, use the command:
```shell
CODE=$(check httpbingo.org/status/204)
echo $CODE
```
### Compile
```shell
dart compile exe bin/check.dart -o check
```