curl -X

From wikieduonline
(Redirected from Curl -X POST)
Jump to navigation Jump to search

 curl -XGET https://localhost:9200 -u 'admin:admin' --insecure
curl -X POST --insecure https://your_elk_ip:YOUR_PASS@localhost:9200/_snapshot/gcs_repo/your_latest_snapshot_name/_restore

curl -X POST --data '{
    "id"     :1,
    "method" :"info.getNodeID"
}' -H 'content-type:application/json;'
curl --help
-X, --request <command> Specify request command to use
   --request-target Specify the target for this request
   --resolve <host:port:address[,address]...> Resolve the host+port to this address
   --retry <num>   Retry request if transient problems occur
   --retry-connrefused Retry on connection refused (use with --retry)
   --retry-delay <seconds> Wait time between retries
   --retry-max-time <seconds> Retry only within this period
   --sasl-ir       Enable initial response in SASL authentication
   --service-name <name> SPNEGO service name


  • TOKEN=$(curl -s -X PUT "" -H "X-aws-ec2-metadata-token-ttl-seconds: 21600")


See also[edit]