Difference between revisions of "Curl --header"

From wikieduonline
Jump to navigation Jump to search
 
(8 intermediate revisions by 2 users not shown)
Line 7: Line 7:
 
  curl --header "[[PRIVATE-TOKEN]]: <your_access_token>" https://gitlab.example.com/api/v4/notification_settings
 
  curl --header "[[PRIVATE-TOKEN]]: <your_access_token>" https://gitlab.example.com/api/v4/notification_settings
  
 +
[[curl -H]] "project_id: mainnetAFDASF34534534r3f" https://[[cardano-mainnet.blockfrost.io]]/api/v0[[/pools/]]pool234324234234234234234234/history
  
 
  [[curl -H]] "[[Content-Type]]: [[application/json]]"  [[--request]] [[POST]] [[--data]] '{"email":"[email protected]","password":"YourPassword"}' https://api2.timedoctor.com/api/1.0/login
 
  [[curl -H]] "[[Content-Type]]: [[application/json]]"  [[--request]] [[POST]] [[--data]] '{"email":"[email protected]","password":"YourPassword"}' https://api2.timedoctor.com/api/1.0/login
  
 
  curl \
 
  curl \
   -H "[[Authorization]]: [[Bearer]] "$(gcloud auth application-default print-access-token) \
+
   -H "[[Authorization: Bearer]] "$(gcloud auth application-default print-access-token) \
 
   -H "[[Content-Type]]: application/json; charset=utf-8" \
 
   -H "[[Content-Type]]: application/json; charset=utf-8" \
 
   https://analyticsadmin.googleapis.com/v1alpha/accounts
 
   https://analyticsadmin.googleapis.com/v1alpha/accounts
 +
 +
 +
[[curl $APISERVER/api]] --header "[[Authorization:]] Bearer $TOKEN" --insecure
  
 
== Related ==
 
== Related ==
 
* <code>[[curl -d]]</code>
 
* <code>[[curl -d]]</code>
 
* [[HTTP headers]]
 
* [[HTTP headers]]
* [[Display HTTP response headers]]
+
* [[Display HTTP response headers]]: <code>[[curl -v]]</code>
 +
* [[curl: no URL specified!]]
 +
* [[Access Kubernetes REST API using default token]]
  
 
== See also ==
 
== See also ==

Latest revision as of 13:21, 30 October 2023

curl --header or curl -H

Examples[edit]

curl --header 'X-JFrog-Art-Api: 1234567890'
curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/notification_settings
curl -H "project_id: mainnetAFDASF34534534r3f" https://cardano-mainnet.blockfrost.io/api/v0/pools/pool234324234234234234234234/history
curl -H "Content-Type: application/json"  --request POST --data '{"email":"[email protected]","password":"YourPassword"}' https://api2.timedoctor.com/api/1.0/login
curl \
 -H "Authorization: Bearer "$(gcloud auth application-default print-access-token) \
 -H "Content-Type: application/json; charset=utf-8" \
 https://analyticsadmin.googleapis.com/v1alpha/accounts


curl $APISERVER/api --header "Authorization: Bearer $TOKEN" --insecure

Related[edit]

See also[edit]

Advertising: