21. Putting it together
● Getting
– Anything but GET
● 405 Method Not Allowed
– Resource not found
● 404 Not Found
– Success
● 200 OK
– Moved
● 301 Permanent Redirect or 302 Found
22. Putting it together
● Adding
– Anything but POST
● 405 Method Not Allowed
– Resource already existed
● 303 See Other
– Success
● 201 Created
– Error
● 500 Internal Server Error with description
23. Putting it together
● Editing
– Anything but PUT or POST
● 405 Method Not Allowed
– Resource does not exist
● 404 Not Found
– Success
● 200 OK
– Error
● 500 Internal Server Error with description
24. Putting it together
● Deleting
– Anything but DELETE or POST
● 405 Method Not Allowed
– Resource does not exist
● 404 Not Found
– Success
● 200 OK or 204 No Content
– Error
● 500 Internal Server Error with description
25. Putting it together
● Everything
– Not logged in
● 401 Unauthorized
– Logged in but permission denied
● 403 Forbidden
26. Putting it together
● Why POST or DELETE/PUT
– Client support
– _method=VERB
● /users.json?_method=POST
Thank you _____________
Today I’m going to be talking about creating a RESTful API with PHP. Not just any RESTful API, but an Epic one.
<number>