Skip to content

Instantly share code, notes, and snippets.

@tuupola
Created November 17, 2017 17:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tuupola/b7bc11b48c38b4410cb706ce71edf7cb to your computer and use it in GitHub Desktop.
Save tuupola/b7bc11b48c38b4410cb706ce71edf7cb to your computer and use it in GitHub Desktop.
$ curl "https://192.168.50.52/todos" \
--request POST \
--include \
--insecure \
--header "Authorization: Bearer $TOKEN" \
--header "Content-Type: application/json" \
--data '{ "title": "Test the API", "order": 10 }'
HTTP/1.1 201 Created
ETag: "c39de417d4d1f5fe22d19cad68d672d8"
Last-Modified: Sat, 16 Apr 2016 10:21:50 GMT
Location: /todos/12Cf2ZjVvyu3A
Content-Type: application/json
{
"data": {
"uid": "12Cf2ZjVvyu3A",
"order": 10,
"title": "Test the API",
"completed": false,
"links": {
"self": "/todos/12Cf2ZjVvyu3A"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment