The -k turns off certificate check so that it works with self-signed certs. This is much better than a TCP Tunnel logging or using tcpdump in my opinion. If you instead need to log the HTTP Headers of a post in a web form, use LiveHTTPHeaders.
curl -i -k -X POST -H "Accept: text/xml" -H "Content-Type: text/xml" -d "xml_goes_here" https://host.domain/path/to/dir/service
Thursday, May 21, 2009
Log or Output HTTP Headers and Body and Do HTTP/HTTPS POST XML
Log or output HTTP headers and body and by doing a simple HTTP/HTTPS POST of XML with curl: (thanks to Liz for this info)