Difference between revisions of "Curl --header"

From wikieduonline
Jump to navigation Jump to search
 
(8 intermediate revisions by the same user not shown)
Line 2: Line 2:
  
 
<code>curl --header or  [[curl -H]]</code>
 
<code>curl --header or  [[curl -H]]</code>
 +
 +
 +
  -H "[[Authorization: Bearer]] ..."
  
 
== Examples ==
 
== Examples ==
Line 12: Line 15:
  
 
  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>
 +
* <code>[[curl -X]]</code>
 
* [[HTTP headers]]
 
* [[HTTP headers]]
 
* [[Display HTTP response headers]]: <code>[[curl -v]]</code>
 
* [[Display HTTP response headers]]: <code>[[curl -v]]</code>
 
* [[curl: no URL specified!]]
 
* [[curl: no URL specified!]]
 
* [[Access Kubernetes REST API using default token]]
 
* [[Access Kubernetes REST API using default token]]
 +
* [[8551]]
  
 
== See also ==
 
== See also ==
 +
* {{curl -H}}
 
* {{curl}}
 
* {{curl}}
 
* {{HTTP2}}
 
* {{HTTP2}}
  
 
[[Category:cURL]]
 
[[Category:cURL]]

Latest revision as of 08:32, 14 August 2024

Advertising: