Difference between revisions of "Curl --header"
Jump to navigation
Jump to search
(23 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
{{lowercase}} | {{lowercase}} | ||
+ | <code>curl --header or [[curl -H]]</code> | ||
+ | |||
+ | |||
+ | -H "[[Authorization: Bearer]] ..." | ||
+ | |||
+ | == Examples == | ||
curl --header 'X-JFrog-Art-Api: 1234567890' | curl --header 'X-JFrog-Art-Api: 1234567890' | ||
− | 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 "[[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 == | |
+ | * <code>[[curl -d]]</code> | ||
+ | * <code>[[curl -X]]</code> | ||
+ | * [[HTTP headers]] | ||
+ | * [[Display HTTP response headers]]: <code>[[curl -v]]</code> | ||
+ | * [[curl: no URL specified!]] | ||
+ | * [[Access Kubernetes REST API using default token]] | ||
+ | * [[8551]] | ||
== See also == | == See also == | ||
+ | * {{curl -H}} | ||
* {{curl}} | * {{curl}} | ||
+ | * {{HTTP2}} | ||
[[Category:cURL]] | [[Category:cURL]] |
Latest revision as of 08:32, 14 August 2024
curl --header or curl -H
-H "Authorization: Bearer ..."
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]
curl -d
curl -X
- HTTP headers
- Display HTTP response headers:
curl -v
- curl: no URL specified!
- Access Kubernetes REST API using default token
- 8551
See also[edit]
curl -H
- cURL,
curl -s
,-X, -x
,curl -T
,curl --help
,curl -L, curl -m
,curl -o
,curl -X POST
,curl -d
,curl --header
,curl -I
,curl --silent
,curl -Is
,curl -k or curl --insecure, curl -XPUT, curl -d
,~/.curlrc, curl -i, curl --version, curl --help
- HTTP/2, HTTP/3, Media type (
Content-Type
), HTTP headers, CVE-2023-44487 HTTP/2 Rapid Reset Vulnerability, Cloudflare Protocol optimization
Advertising: