I wish to send a header to my Apache server on a Linux box. How can I achieve this via a curl call?
相关问题
- Google Apps Script: testing doPost() with cURL
- Can I skip certificate verification oracle utl_htt
- PHP Empty $_POST
- Requests Library Force Use of HTTP/1.1 On HTTPS Pr
- Change curl SSL Version
相关文章
- Is there a size limit for HTTP response headers on
- 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
- Can I set an Access-Control-Allow-Origin header to
GET (multiple parameters):
or
or
or
Use
-H or --header
.Man page: http://curl.haxx.se/docs/manpage.html#-H
In PHP:
or you can set multiple:
man curl
:Example:
You can see the request that curl sent by adding the
-v
option.I've switched from curl to Httpie; the syntax looks like:
GET:
with JSON:
with XML:
POST:
For posting data:
For file upload:
RESTful HTTP Post:
For logging into a site (auth):