testing CURL without real server

Question for curl expert... I want to see what curl sends out, because I want to know what a proper HTTP request looks like. Manpage says -v or --trace. OK. But, curl requires a real URL to connect to. How can I run curl without specifying a real server/URL? I can't find any "dry-run" or "fake" options. -- William

nc -l 8080 then curl to 127.0.0.1:8080 On Wed, Mar 29, 2017 at 12:45 AM, William Park via talk <talk@gtalug.org> wrote:
Question for curl expert...
I want to see what curl sends out, because I want to know what a proper HTTP request looks like. Manpage says -v or --trace. OK. But, curl requires a real URL to connect to.
How can I run curl without specifying a real server/URL? I can't find any "dry-run" or "fake" options. -- William --- Talk Mailing List talk@gtalug.org https://gtalug.org/mailman/listinfo/talk

On 29/03/17 00:45, William Park via talk wrote:
Question for curl expert...
I want to see what curl sends out, because I want to know what a proper HTTP request looks like. Manpage says -v or --trace. OK. But, curl requires a real URL to connect to.
https://www.w3.org/Protocols/rfc2616/rfc2616-sec5.html describes the range of what an HTTP 1.1 request can look like. e.g. OPTIONS, POST, request headers for specifying content types etc. Cheers, Jamon

On Wed, Mar 29, 2017 at 12:45 AM, William Park via talk <talk@gtalug.org> wrote:
Question for curl expert...
I want to see what curl sends out, because I want to know what a proper HTTP request looks like. Manpage says -v or --trace. OK. But, curl requires a real URL to connect to.
How can I run curl without specifying a real server/URL? I can't find any "dry-run" or "fake" options.
I use <http://httpbin.org/> when I need to test an HTTP client and what it's request is.
participants (5)
-
Jamon Camisso
-
lsorense@csclub.uwaterloo.ca
-
Myles Braithwaite
-
ted leslie
-
William Park