Thanks to visit codestin.com
Credit goes to github.com

Skip to content

send request which is saved in a text file #12

@blueray453

Description

@blueray453

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions