With the curl command line tool, is it possible to echo
, print, or view the request, and not send it? Sort of like a -n
option? I would like to see the request header & body, and anything else that's included. Is there anything else that's sent besides header & body?
相关问题
- Google Apps Script: testing doPost() with cURL
- POST Base64 encoded data in PHP
- Can I skip certificate verification oracle utl_htt
- PHP Empty $_POST
- Requests Library Force Use of HTTP/1.1 On HTTPS Pr
相关文章
- Is there a size limit for HTTP response headers on
- Echo PHP inside Javascript?
- What is the definition of HTTP_X_PURPOSE?
- Why does Google Chrome NOT use cached pages when I
- Programmatically scraping a response header within
- What to do with extra HTTP header from proxy?
- How can I immediately cancel a curl operation?
- Get Amazon MWS results to Json or Xml and elaborat
A HTTP request is constructed with a request line, headers and a body.
curl does not seem to have a flag to do a "dry-run". Depending on your needs, you might be able to see what you want using netcat as a proxy:
Let me second the suggestion to use 'nc' (netcat) to get to see all the details without sending anything offsite to anywhere.
But you can also get all the details for any curl command line request by using the --trace or --trace-ascii commands that can dump all incoming and outgoing data and requests for inspection.
These options have the additional benefit in comparison to 'nc' that they can show the protocol details even for HTTPS operations and with "real" command lines etc.