Skip to content

Instantly share code, notes, and snippets.

@canweriotnow
Created December 6, 2013 16:00
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 canweriotnow/7827155 to your computer and use it in GitHub Desktop.
Save canweriotnow/7827155 to your computer and use it in GitHub Desktop.
Quickie test server for testing things
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