tips:linux:httppost
Differences
This shows you the differences between two versions of the page.
Last revisionBoth sides next revision | |||
tips:linux:httppost [2009/06/08 08:46] – created erik | tips:linux:httppost [2009/06/08 08:47] – erik | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Quickly Send a HTTP POST Request ====== | ||
+ | Have you ever wanted to quickly send a POST request to a HTTP server? It's pretty easy to do using curl. | ||
+ | |||
+ | For example to send XML via a POST request, you could use the following: | ||
+ | |||
+ | curl --header " | ||
+ | |||
+ | I use this method for testing almost every day. Saves a lot of time. | ||
+ | |||
+ | Another curl command I use often is: | ||
+ | |||
+ | curl -I http:// | ||
+ | |||
+ | to get a HEAD request. | ||
+ | |||
+ | And | ||
+ | |||
+ | curl --header " | ||
+ | |||
+ | to get the compressed request. | ||
+ | |||
+ | You can also pipe the resulting page to vim, using: | ||
+ | |||
+ | curl http:// | ||
+ | |||
+ | use: | ||
+ | |||
+ | curl -i http:// | ||
+ | |||
+ | to also view the headers. |
tips/linux/httppost.txt · Last modified: 2012/06/02 06:09 by erik