Skip to content

Instantly share code, notes, and snippets.

@guenter
Created March 1, 2013 23:07
Show Gist options
  • Save guenter/5068676 to your computer and use it in GitHub Desktop.
Save guenter/5068676 to your computer and use it in GitHub Desktop.
Using Twitter Commons sample app
# Clone the repo:
$ git clone git://github.com/airbnb/twitter-commons-sample.git
# Build using Maven:
$ mvn package
# Run:
$ bash run_local.bash
# Like a place:
$ curl -i -H 'Content-type: application/json' --data-binary '{"name":"San Francisco"}' localhost:8080/suggest/v1/like
HTTP/1.1 204 No Content
Content-Type: application/json
Server: Jetty(6.1.x)
# Get a suggestion:
$ curl localhost:8080/suggest/v1/suggest
HTTP/1.1 200 OK
Content-Type: application/json
Transfer-Encoding: chunked
Server: Jetty(6.1.x)
{"name":"San Francisco"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment