https://github.com/integralist/crs
HTTP Response Header Sorting and Filtering
https://github.com/integralist/crs
http http-client http-header http-headers http-response open-source rust rust-crate rust-lang
Last synced: 3 months ago
JSON representation
HTTP Response Header Sorting and Filtering
- Host: GitHub
- URL: https://github.com/integralist/crs
- Owner: Integralist
- Created: 2022-03-19T17:31:35.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-12-19T12:56:15.000Z (about 1 year ago)
- Last Synced: 2025-01-31T16:55:27.512Z (11 months ago)
- Topics: http, http-client, http-header, http-headers, http-response, open-source, rust, rust-crate, rust-lang
- Language: Rust
- Homepage:
- Size: 4.82 MB
- Stars: 5
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# crs
The `crs` command is a Rust version of the [Carbon](https://github.com/Integralist/carbon) CLI.
Carbon can make a HTTP request, then sort, filter and display the HTTP response headers.
> **NOTE**: The name comes from carbon filtering: method of filtering impurities.
## Usage

## Examples
### Default
The default behaviour is to display all response headers, followed by the HTTP status code:

### Filtering and JSON
- The `--filter` flag will attempt a partial match for each comma-separated value.
- The `--json` flag outputs the data as JSON.
> **NOTE**: The following example pipes to [`jq`](https://stedolan.github.io/jq/) for pretty-printing.


### Response Body
- The `--body` flag will display the response body below the HTTP headers/status.
> **NOTE:** The `--body` flag is incompatible with the `--json` flag\
> i.e. don't use `--json` and also try to include the response body.

## TODO
- [Deploy binaries via GitHub Actions][1]
- [Read article on testing a CLI in Rust][2]
[1]: https://dzfrias.dev/blog/deploy-rust-cross-platform-github-actions/
[2]: https://rust.code-maven.com/test-command-line-application