46
35

More than 3 years have passed since last update.

curlコマンドでBearer認証のトークンを送る方法

Last updated at Posted at 2019-11-20

curlコマンドでBearer認証のトークンを送る時のメモ

GET

curl -H GET 'http://localhost:3000/XXXX/XXXX?name=hello&id=100' -H 'Content-Type:application/json;charset=utf-8' -H 'Authorization: Bearer XXXX' | jq .

POST

curl -H POST 'http://localhost:3000/XXXX/XXXX' -H 'Content-Type: application/json;charset=utf-8' -d '{"name":"hello", "id":"100"}' -H 'Authorization: Bearer XXXX' | jq .
46
35
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
46
35