Skip to content

Instantly share code, notes, and snippets.

@resistorsoftware
Created December 15, 2010 02:45
Show Gist options
  • Save resistorsoftware/741549 to your computer and use it in GitHub Desktop.
Save resistorsoftware/741549 to your computer and use it in GitHub Desktop.
Simple grape eg
require 'grape'
class Foo < Grape::API
version '1'
resource :services do
get :language_detector do
["english", "french"]
end
end
end
run Foo
http://localhost:9090/1/services/language_detector.json> GET
HTTP/1.1 404 Not Found
Connection: close
Date: Wed, 15 Dec 2010 02:43:25 GMT
X-Cascade: pass
Transfer-Encoding: chunked
Content-Type: text/html
Not Found
http://localhost:9090/1/services/language_detector.json>
127.0.0.1 - - [14/Dec/2010 21:43:25] "GET /1/services/language_detector.json HTTP/1.1" 404 - 0.0031
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment