Return JSON (tested) in Sinatra and Rabl
- Add an attribute named
:execution_time
to the LogRequest - Make sure to test that it is included in the JSON result
- Implement a post "/" that will log the request
- Receive JSON on the post and insert the record into the in-memory store
- Write a test that confirms that you can post a log entry and read it back on a subsequent call
- Implement a user scheme, where a User object has a unique code
- If I pass in the "code" as a parameter to get "/", then it only returns my logs
- Make the code be required on the post. Return a 401 error code if it is not present
- Testing with Sinatra: http://www.sinatrarb.com/testing.html
- Rack/Test: https://github.com/brynary/rack-test
- RABL: https://github.com/nesquena/rabl
- HTTPClient (app used to visualize HTTP calls): Direct and on App Store
Copyright: 2012 Jesse Wolgamott, MIT License (See LICENSE)