Commit 1b6cf0e5 authored by Fabien Potencier's avatar Fabien Potencier

fixed CS

parent bb2469de
...@@ -24,6 +24,7 @@ indicate that using the ``Content-Type`` header. ...@@ -24,6 +24,7 @@ indicate that using the ``Content-Type`` header.
Accept: application/json Accept: application/json
Content-Type: application/json Content-Type: application/json
Content-Length: 57 Content-Length: 57
{"title":"Hello World!","body":"This is my first post!"} {"title":"Hello World!","body":"This is my first post!"}
Response Response
...@@ -39,6 +40,7 @@ JSON. ...@@ -39,6 +40,7 @@ JSON.
Content-Type: application/json Content-Type: application/json
Content-Length: 65 Content-Length: 65
Connection: close Connection: close
{"id":"1","title":"Hello World!","body":"This is my first post!"} {"id":"1","title":"Hello World!","body":"This is my first post!"}
Parsing the request body Parsing the request body
...@@ -96,4 +98,3 @@ utility, which allows sending HTTP requests. ...@@ -96,4 +98,3 @@ utility, which allows sending HTTP requests.
$ curl http://blog.lo/blog/posts -d '{"title":"Hello World!","body":"This is my first post!"}' -H 'Content-Type: application/json' $ curl http://blog.lo/blog/posts -d '{"title":"Hello World!","body":"This is my first post!"}' -H 'Content-Type: application/json'
{"id":"1","title":"Hello World!","body":"This is my first post!"} {"id":"1","title":"Hello World!","body":"This is my first post!"}
$
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment