Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

send request which is saved in a text file #12

Open
blueray453 opened this issue Dec 4, 2020 · 0 comments
Open

send request which is saved in a text file #12

blueray453 opened this issue Dec 4, 2020 · 0 comments

Comments

@blueray453
Copy link

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

I can do something like the following to send request (which is saved in raw-http.txt) and get response using openssl.

% echo '"'; cat raw-http.txt; echo '"'
"
GET / HTTP/1.0
Host: www.google.com

"
% cat raw-http.txt | openssl s_client -quiet -connect www.google.com:443 2>/dev/null

Can h2c be used for that?

Another question. http/2 headers are encoded using hpack. suppose my raw-http2.txt looks like:

:method:GET
:path:/
:scheme:https
:authority:www.google.com
user-agent:curl/7.58.0
accept:*/*

So, i think i have to do something like:

% cat raw-http2.txt | encode-request | openssl s_client -quiet -connect www.google.com:443 2>/dev/null

can I do it using h2c?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant