1 2 3 4 | http://www.example.com/books/123456 http://www.example.com/softwares/im/db2/9.5 http://www.example.com/blog/2010/09/10/1 http://www.example.com/bugs/by-state/new |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | GET /books/123456/xml HTTP/1.1 Host: example.com Reponse: HTTP/1.1 200 OK Date: Fri, 10 Sept 2010 17:15:33 GMT Last-Modified: Fri, 10 Sept 2010 17:15:33 GMT ETag: "2b3f6-a4-5b572640" Accept-Ranges: updated Content-Type: text/xml; charset="utf-8" <book category="CHILDREN"> <title lang="en">Harry Potter</title> <author>J K. Rowling</author> <year>2005</year> <price>24.99</price> </book> |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | GET /books/123456/json HTTP/1.1 Host: example.com Reponse: HTTP/1.1 200 OK Date: Fri, 10 Sept 2010 17:15:33 GMT Last-Modified: Fri, 10 Sept 2010 17:15:33 GMT ETag: "2b3f6-a4-5b572640" Accept-Ranges: updated Content-Type: text/json; charset="utf-8" [ "book": { "title":Harry Potter, "author":J K. Rowling, "year":2005, "price":24.99 } ] |
1 2 3 4 5 6 7 8 9 10 11 12 13 | GET /books/123456/csv HTTP/1.1 Host: example.com Reponse: HTTP/1.1 200 OK Date: Fri, 10 Sept 2010 17:15:33 GMT Last-Modified: Fri, 10 Sept 2010 17:15:33 GMT ETag: "2b3f6-a4-5b572640" Accept-Ranges: updated Content-Type: text/csv; charset="utf-8" title,author,year,price Harry Potter,J K. Rowling,2005,24.99 |
1 2 3 | GET /books/123456 HTTP/1.1 Host: example.com Accept: text/xml |
1 2 3 | GET /books/123456 HTTP/1.1 Host: example.com Accept: text/json |
1 2 3 | GET /books/123456 HTTP/1.1 Host: example.com Accept: text/csv |
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) | Powered by Discuz! 7.0.0 |