https://github.com/lqr471814/diff-headers
A dead simple utility to compare / diff HTTP headers.
https://github.com/lqr471814/diff-headers
compare diff headers http
Last synced: 10 months ago
JSON representation
A dead simple utility to compare / diff HTTP headers.
- Host: GitHub
- URL: https://github.com/lqr471814/diff-headers
- Owner: LQR471814
- Created: 2023-11-12T05:45:09.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-11-12T05:48:27.000Z (over 2 years ago)
- Last Synced: 2025-05-18T18:48:18.736Z (11 months ago)
- Topics: compare, diff, headers, http
- Language: Go
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## diff-headers
> A dead simple utility to compare / diff HTTP headers.
### Usage
```
# command
$ diff-headers file1.txt file2.txt
# file1.txt
accept-ranges: bytes
age: 203
cache-control: public,max-age=0,must-revalidate
server: Netlify
# file2.txt (lines without ":" are ignored)
HTTP/2 200
age: 103
content-type: text/html
last-modified: Sun, 18 Jan 2015 00:04:33 GMT
vary: Accept-Encoding,User-Agent
# output
===== file2.txt is missing the following headers from file1.txt
HEADER VALUE
accept-ranges bytes
cache-control public,max-age=0,must-revalidate
server netlify
===== file1.txt is missing the following headers from file2.txt
HEADER VALUE
content-type text/html
last-modified sun, 18 jan 2015 00:04:33 gmt
vary accept-encoding,user-agent
===== Differences in shared header values
HEADER file1.txt file2.txt
age 203 103
```