Your SlideShare is downloading. ×
HTTP is Hard
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Introducing the official SlideShare app

Stunning, full-screen experience for iPhone and Android

Text the download link to your phone

Standard text messaging rates apply

HTTP is Hard

868
views

Published on

Published in: Technology

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
868
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. HTTP is HARD Eric Redmond makes Riak @coderoshi Wednesday, November 13, 13
  • 2. HTTP? • Hyper-Text Transport Protocol • Client Request -­‐> Server Response • Stateless Wednesday, November 13, 13
  • 3. HTTP Response Codes • HTTP/1.1 200 OK • Ranges have meaning (classes) • • • • • Wednesday, November 13, 13 100-199 - Informational 200-299 - Success 300-399 - Further Client Action 400-499 - Client Error 500-599 - Server Error
  • 4. 1xx - Informational • 100 Continue • 101 Switching Protocols • 102 Processing Wednesday, November 13, 13
  • 5. 2xx - Success • 200 OK • 201 Created • 202 Accepted • 203 Non-Authoritative Information • 204 No Content • ... Wednesday, November 13, 13
  • 6. 3xx - Client Action • 300 Multiple Choices • 301 Moved Permanently • 302 Found • 303 See Other • 304 Not Modified • ... Wednesday, November 13, 13
  • 7. 4xx - Client Error • 400 Bad Request • 401 Unauthorized • 402 Payment Required • 403 Forbidden • 404 Not Found • ... Wednesday, November 13, 13
  • 8. 5xx - Server Error • 500 Internal Server Error • 501 Not Implemented • 502 Bad Gateway • 503 Service Unavailable • 504 Gateway Timeout • ... Wednesday, November 13, 13
  • 9. http://codes.io/200 Wednesday, November 13, 13
  • 10. Client Methods • POST • GET • • Wednesday, November 13, 13
  • 11. Client Methods • POST • GET • PUT • DELETE Wednesday, November 13, 13
  • 12. Client Methods • POST • GET • PUT • DELETE Wednesday, November 13, 13 • Create • Read • Update • Delete
  • 13. More Methods? • HEAD • OPTIONS • TRACE • CONNECT • PATCH Wednesday, November 13, 13
  • 14. Learning from The Wrong Way Wednesday, November 13, 13
  • 15. curl -H "Content-type: application/json" http://localhost:35357/v2.0/tokens -d '{"auth":{"passwordCredentials": {"username": "joeuser", "password": "secret"}}}' Wednesday, November 13, 13
  • 16. curl -H "Content-type: application/json" -H "Authorization: Basic am9ldXNlcjpzZWNyZXQ=" http://localhost:35357/v2.0/tokens Wednesday, November 13, 13
  • 17. riak.com.cn docs.basho.com Wednesday, November 13, 13 汉语 English
  • 18. https://raw.github.com/wiki/basho/webmachine/images/http-headers-status-v3.png Wednesday, November 13, 13
  • 19. Wednesday, November 13, 13
  • 20. Wednesday, November 13, 13
  • 21. A Sad History Wednesday, November 13, 13
  • 22. http://github.com/coderoshi/ webmachine-nodejs Wednesday, November 13, 13
  • 23. Parting Thoughts Wednesday, November 13, 13