Created
December 15, 2010 02:45
-
-
Save resistorsoftware/741549 to your computer and use it in GitHub Desktop.
Simple grape eg
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 '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