Created
December 6, 2013 16:00
-
-
Save canweriotnow/7827155 to your computer and use it in GitHub Desktop.
Quickie test server for testing things
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
require 'sinatra' | |
require 'json' | |
post '/good' do | |
content_type :json | |
[201, {message: "Successfully registered."}.to_json] | |
end | |
post '/bad' do | |
content_type :json | |
[422, {message: "Already registered."}.to_json] | |
end | |
post '/secret' do | |
content_type :json | |
[403, {message: "TOO MANY SECRETS"}.to_json] | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment