Child pages
  • Useful curl Commands

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Setting a Header

Code Block
curl -H 'Content-type: application/xml'
curl -H 'Content-type: application/x-javascript'

POST params

Code Block
curl -d "hi=there&my=friend" <url>

Follow Redirects

Code Block
curl -L --insecure

Also, the --insecure means to trust the SSL cert, as, in this case, it is self-signed.

POST with Headers and Data from file

Code Block
curl -X POST --data @dsml-request.xml -H "Content-Type: text/xml" -H "Authorization: Basic <base64-encoded bind dn and password>"