Skip to content

Instantly share code, notes, and snippets.

@matzew
Created August 20, 2012 14:51
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 matzew/3404887 to your computer and use it in GitHub Desktop.
Save matzew/3404887 to your computer and use it in GitHub Desktop.
Creating a project with CURL
curl -v -H "Content-type: application/json" -X POST -d '{"title":"A new project"}' http://localhost:8080/todo-server/project
* About to connect() to localhost port 8080 (#0)
* Trying 127.0.0.1...
* connected
* Connected to localhost (127.0.0.1) port 8080 (#0)
> POST /todo-server/project HTTP/1.1
> User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8r zlib/1.2.5
> Host: localhost:8080
> Accept: */*
> Content-type: application/json
> Content-Length: 25
>
* upload completely sent off: 25 out of 25 bytes
< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Content-Type: application/json
< Transfer-Encoding: chunked
< Date: Mon, 20 Aug 2012 14:47:17 GMT
<
* Connection #0 to host localhost left intact
{"id":1,"title":"A new project","style":null,"tasks":[]}* Closing connection #0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment