-
Notifications
You must be signed in to change notification settings - Fork 0
/
h2c.html
63 lines (54 loc) · 2.25 KB
/
h2c.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<p>
Paste the HTTP request into the text field and get the correspending curl
command line for generating such a request.
<p>
<form action="./" method="POST">
<table><tr><td valign="top">
<textarea name="http" rows="15" cols="50">
%http%
</textarea>
</td><td valign="top">
<input type="checkbox" name="shortopt" %shortopt%> use short command line options
<br>
<input type="checkbox" name="verboseopt" %verboseopt%> enable verbose output
<br>
<input type="checkbox" name="defaultopt" %defaultopt%> allow curl's default headers
<br>
<input type="checkbox" name="versionopt" %versionopt%> insist on same HTTP version
</td></tr></table>
<input type=submit value="convert">
</form>
<p>
Command:
<div style="font-size: 120%; font-family: monospace; background-color: #f0f0f0; padding: 0.5em 0.5em 0.5em 0.5em;">
%curl%
</div>
<h2>Documentation links for used options</h2>
<ul>
%docs%
</ul>
<p>
The generated command line <i>assumes</i> a HTTPS site and generates such a
URL. There is typically nothing in the request that tells if HTTPS or HTTP
was used.
<p>
If you submit an illegally formatted HTTP request, chances are the shown
curl command line might not reproduce it perfectly. curl is primarily made
to generate fine HTTP.
<h2>Use this with curl!</h2>
<p>
Save the HTTP request you want to send in a local <b>file</b>, then send it
here like this:
<div style="font-size: 120%; font-family: monospace; background-color: #f0f0f0; padding: 0.5em 0.5em 0.5em 0.5em;">
curl --data-urlencode http@file https://curl.haxx.se/h2c/
</div>
<p>
... and you'll get a curl command line in response.
<h2>Privacy</h2>
<p>
All data you submit to this web service will be crunched and converted on the
curl server. To keep your HTTP requests private, download h2c and run it
yourself locally.
<hr>
<a href="https://github.com/curl/h2c">h2c on github</a>
<a href="https://github.com/curl/h2c"><img style="position: absolute; top: 0; left: 0; border: 0;" src="https://camo.githubusercontent.com/82b228a3648bf44fc1163ef44c62fcc60081495e/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f6c6566745f7265645f6161303030302e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_left_red_aa0000.png"></a>