Created
September 3, 2014 02:34
-
-
Save xenoterracide/feaf505ebc5cc1cf799c to your computer and use it in GitHub Desktop.
some http
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HTTP/1.1 200 OK | |
Server: Apache-Coyote/1.1 | |
Content-Type: application/hal+json | |
Transfer-Encoding: chunked | |
Date: Wed, 03 Sep 2014 02:21:49 GMT | |
{ | |
"_links" : { | |
"task" : { | |
"href" : "http://localhost:8080/task{?page,size,sort}", | |
"templated" : true | |
} | |
} | |
}% LM % curl -i -X POST -H "Content-Type:application/json" -d'{ "description" : "first task" }' http://localhost:8080/task | |
HTTP/1.1 201 Created | |
Server: Apache-Coyote/1.1 | |
Location: http://localhost:8080/task/a599502c-dbb6-4bbc-9795-f7dd894a89e3 | |
Content-Length: 0 | |
Date: Wed, 03 Sep 2014 02:22:59 GMT | |
LM % curl -i http://localhost:8080/tasks slave-vi | |
HTTP/1.1 404 Not Found | |
Server: Apache-Coyote/1.1 | |
Content-Type: application/json;charset=UTF-8 | |
Transfer-Encoding: chunked | |
Date: Wed, 03 Sep 2014 02:23:17 GMT | |
{"timestamp":1409710997067,"status":404,"error":"Not Found","message":"","path":"/tasks"}% | |
# I created many first tasks before running this | |
LM % curl -i http://localhost:8080/task slave-vi | |
HTTP/1.1 200 OK | |
Server: Apache-Coyote/1.1 | |
Content-Type: application/hal+json | |
Transfer-Encoding: chunked | |
Date: Wed, 03 Sep 2014 02:23:24 GMT | |
{ | |
"_links" : { | |
"self" : { | |
"href" : "http://localhost:8080/task{?page,size,sort}", | |
"templated" : true | |
} | |
}, | |
"_embedded" : { | |
"task" : [ { | |
"description" : "first task", | |
"_links" : { | |
"self" : { | |
"href" : "http://localhost:8080/task/f8eabf43-49be-477b-a119-4d61f2b84bba" | |
} | |
} | |
}, { | |
"description" : "first task", | |
"_links" : { | |
"self" : { | |
"href" : "http://localhost:8080/task/61ab9de1-efac-4741-96f9-84c1a6cd059a" | |
} | |
} | |
}, { | |
"description" : "first task", | |
"_links" : { | |
"self" : { | |
"href" : "http://localhost:8080/task/a599502c-dbb6-4bbc-9795-f7dd894a89e3" | |
} | |
} | |
} ] | |
}, | |
"page" : { | |
"size" : 20, | |
"totalElements" : 3, | |
"totalPages" : 1, | |
"number" : 0 | |
} | |
} | |
LM % curl -i http://localhost:8080/task/a599502c-dbb6-4bbc-9795-f7dd894a89e3 | |
HTTP/1.1 200 OK | |
Server: Apache-Coyote/1.1 | |
Content-Type: application/hal+json | |
Transfer-Encoding: chunked | |
Date: Wed, 03 Sep 2014 02:25:41 GMT | |
{ | |
"description" : "first task", | |
"_links" : { | |
"self" : { | |
"href" : "http://localhost:8080/task/a599502c-dbb6-4bbc-9795-f7dd894a89e3" | |
} | |
} | |
}% | |
LM % curl -i -X PUT -H "Content-Type:application/json" -d'{ "description" : "better" }' http://localhost:8080/task/a599502c-dbb6-4bbc-9795-f7dd894a89e3 | |
HTTP/1.1 204 No Content | |
Server: Apache-Coyote/1.1 | |
Location: http://localhost:8080/task/a599502c-dbb6-4bbc-9795-f7dd894a89e3 | |
Date: Wed, 03 Sep 2014 02:31:57 GMT | |
LM % curl -i -X DELETE http://localhost:8080/task/a599502c-dbb6-4bbc-9795-f7dd894a89e3 | |
HTTP/1.1 204 No Content | |
Server: Apache-Coyote/1.1 | |
Date: Wed, 03 Sep 2014 02:32:51 GMT | |
LM % curl -i http://localhost:8080/task/a599502c-dbb6-4bbc-9795-f7dd894a89e3 | |
HTTP/1.1 404 Not Found | |
Server: Apache-Coyote/1.1 | |
Content-Length: 0 | |
Date: Wed, 03 Sep 2014 02:33:04 GMT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment