Skip to content

Instantly share code, notes, and snippets.

@guilhermesilveira
Created June 9, 2010 00:39
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 guilhermesilveira/430865 to your computer and use it in GitHub Desktop.
Save guilhermesilveira/430865 to your computer and use it in GitHub Desktop.
resource = Restfulie.at('http://localhost:3000/items').as("application/xml").post!(:item => { :name => "Robin costume", :price => 25.0})
resource = Restfulie.at('http://localhost:3000/items').as("application/json").post!(:item => { :name => "Robin costume", :price => 25.0})
resource = Restfulie.at('http://localhost:3000/items').as("application/atom+xml").post!(:item => { :name => "Robin costume", :price => 25.0})
# already follows 201
resource.item.name
resource.response.code # == 200
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment