9
9

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

curlでcookieセットしながらJSONでPUT, POSTする

Posted at

GET

curl -b {cookie_info} -X GET {url}

curl -b 'some_id=hoge; some_token=fuga' -X GET http://hoge.com

PUT

curl -b {cookie_info} -H {header_info} -X PUT -d {json} {url}

curl -b 'some_id=hoge; some_token=fuga' -H "Accept: application/json" -H "Content-type: application/json" -X PUT -d '{"id":100,"name":"bar"}' http://hoge.com

POST

curl -b {cookie_info} -H {header_info} -X POST -d {json} {url}

curl -b 'some_id=hoge; some_token=fuga' -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{"id":100,"name":"bar"}' http://hoge.com
9
9
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
9
9

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?