REST has an absence of bureaucracy
- Names (URIs)
- Connections (links)
- Every resource is addressable
- Can make requests in any order
- Can make doing transactions a bit challenging (need to treat state as a resource)
- A uniform resource interface
IOW: “Respect the web”¶
- RFC 2616
Adding an API¶
- Odds are you already have one! Your website!
- But cool kids like me (Danny) use JSON
- use Python 2.6+ version of json over simplejson to get better performance. Same library, just implemented in C.
- Jacob likes to construct RESTful resources so he can encapsulate all the RESTy bits in external functions and classes. Keeps his API methods really short.
- In POSTS he remembers to set the right status