Created
March 18, 2012 16:22
This file contains 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
get '/dogs' do | |
# get a listing of all the dogs | |
end | |
get '/dog/:id' do | |
# just get one dog, you might find him like this: | |
@dog = Dog.get(params[:id]) | |
# using the params convention, you specified in your route | |
end | |
post '/dog' do | |
# create a new dog listing | |
end | |
put '/dog/:id' do | |
# HTTP PUT request method to update an existing dog | |
end | |
delete '/dog/:id' do | |
# HTTP DELETE request method to remove a dog who's been sold! | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment