Skip to content

Instantly share code, notes, and snippets.

@elsewhat
Created May 19, 2012 14:14
Show Gist options
  • Save elsewhat/2730952 to your computer and use it in GitHub Desktop.
Save elsewhat/2730952 to your computer and use it in GitHub Desktop.
CURL FeedResource Output
$ curl -i http://localhost:8080/feed_stream/api/feed/
HTTP/1.1 200 OK
Content-Type: application/json
Transfer-Encoding: chunked
Date: Sat, 19 May 2012 14:10:50 GMT
Server: SAP
{"feedEntry":[{"id":"1","isComment":"false","senderEmail":"dagfinn.parnas@bouvet
.no","senderName":"Dagfinn","text":"First!"},{"id":"2","isComment":"false","send
erEmail":"dagfinn.parnas@gmail.com","senderName":"Dagfinn","text":"This is an ex
ample of a rest service exposed from #sapnwcloud by using jax-rs and jaxb"}]}
$ curl -i -X PUT -H 'Content-Type: application/json' -d '{"sender":"Dagfinn Par
nas","text":"This is a new feed entry created by the REST API","isComment":fals
e,"senderEmail":"dagfinn.parnas@bouvet.no"}' http://localhost:8080/feed_stream/
api/feed/
HTTP/1.1 201 Created
Location: http://localhost:8080/feed_stream/api/feed/51
Content-Length: 0
Date: Sat, 19 May 2012 14:11:50 GMT
Server: SAP
$ curl -i -X POST -H 'Content-Type: application/json' -d '{"senderEmail":"dagfi
nn.parnas@gmail.com"}' http://localhost:8080/feed_stream/api/feed/51
HTTP/1.1 200 OK
Content-Length: 0
Date: Sat, 19 May 2012 14:15:32 GMT
Server: SAP
$ curl -i -H "Accept: application/json" http://localhost:8080/feed_stream/api/
feed/51
HTTP/1.1 200 OK
Content-Type: application/json
Transfer-Encoding: chunked
Date: Sat, 19 May 2012 14:15:39 GMT
Server: SAP
{"id":"51","isComment":"false","senderEmail":"dagfinn.parnas@gmail.com","text":"
This is a new feed entry created by the REST API"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment