h2c
h2c copied to clipboard
headers 2 curl. Provided a set of HTTP request headers, output the curl command line for generating that set. Try the converter online at
Command is not readable on Safari with dark mode. We can add a color property to the line below: [https://github.com/curl/h2c/blob/master/h2c.html#L25](https://github.com/curl/h2c/blob/master/h2c.html#L25)
…escape with post body so checking the double escape and removing it from post body.
I fixed the perlcritic warnings. To do this I also introduced "use strict; use warnings" and therefore I had to introduce the necessary changes described in the commits
The generated commands are invalid for PowerShell, if query string or body contains double quotes or ampersands.
Similar to the `-F` multipart bugs, the strings after `--data-bianry` are not escaped. Given this input: ``` POST / HTTP/1.1 Host: localhost:8000 User-Agent: curl/7.47.0 Accept: */* Content-Length: 5 Content-Type: application/x-www-form-urlencoded...
``` GET http://example.com/this HTTP/1.1 Host: example.com User-Agent: moo/2000 ``` We don't know where the proxy is so we can't generate a perfect command line, but we can do better than...