Grape on Rails
A Grape API mounted on Rails.
- ping: a hello world
GET
API - post: post JSON data
- raise: raise an error, Rails handling exceptions
- protected: API protected with rudimentary Basic Authentication
- headers: demonstrates header handling
Run
bin/setup
rails s
- Try http://localhost:3000/api/ping or http://localhost:3000/api/protected/ping with username and password.
- View Swagger docs at http://localhost:3000/swagger.