curl / Mailing Lists / curl-users / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

send http/2 request which is saved in a text file

From: Ahmad Ismail via curl-users <>
Date: Thu, 3 Dec 2020 07:59:08 +0600

my issue is, i need to see what exactly I am sending or receiving using cli
where the request header is saved in a txt file.

in case of HTTP/1.0, I can do something like the following to send a
request (which is saved in raw-http.txt) and get a response.

% echo '"'; cat raw-http.txt; echo '"'
GET / HTTP/1.0

% cat raw-http.txt | curl "telnet://"

but I am not sure how to deal with it when using HTTP/2, as here the
headers are encoded using hpack.

suppose my raw-http2.txt looks like:


So, i think i have to do something like:

% cat raw-http.txt | encode-request | curl "telnet://"

however I am not sure how to achieve this. any suggestions?

Thanks and Best Regards,
Ahmad Ismail

Received on 2020-12-03