cURL FAQ – часто задаваемые вопросы по cURL

Вопрос: Как сделать GET запрос?
Ответ:

curl -H "Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8" 
     -H "Accept-Encoding:gzip, deflate, sdch" 
     -H "Accept-Language:ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4" 
     -H "Connection:keep-alive" 
     -H "Cookie:cart=sliderDisable=1; cookie_pages=235"
     -H "Host:www.books.ru" 
     -H "User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36" 
     -X GET "http://www.example.com/cart_add.php?product=3642825&currency_id=1&any_price=1"


Как сделать POST запрос?
Ответ:

To be continued...