curl -X POST https://yourdomain.com -d @data.txt
@
is necessary.
curl -L yourdomain.com
Frequently used in test environment.
curl --insecure https://yourdomain.com
# or
curl -k https://yourdomain.com
curl -L yourdomain.com --output myfilename
Force curl to DNS as IPv6.
curl -6 mydomain.com
# From man
# -6, --ipv6 Resolve names to IPv6 addresses
curl -sS -I https://youdomain.com
-s: = --silent
-S: = --show-error
-I: = --head
When my local server domain is mydomain.com
, I test like,
curl https://mydomain.com --resolve mydomain.com:443:127.0.0.1
curl -g \
-X POST \
-H "Content-Type: application/json" \
-d '{"query":"query{somethihg(thisisparam: \"foo\"){field1 field2{subfield1 subfield2(subsubfield1)}}}"}' \
https://my-graphql-endpoint.com