h2c

Convert HTTP headers to curl command-line arguments

brewmacoslinux
Try with needOr install directly
Source

About

Headers 2 curl

Commands

h2c

Examples

Convert headers from browser DevTools to curl command$ h2c < headers.txt
Pipe curl command output with headers to h2c$ curl -i https://example.com 2>&1 | h2c
Convert headers and generate a new curl request$ h2c 'Authorization: Bearer token123' 'Content-Type: application/json'