REST究竟是什么意思?它是什么,为什么它现在变大了? [英] What exactly does REST mean? What is it, and why is it getting big now?

查看:140
本文介绍了REST究竟是什么意思?它是什么,为什么它现在变大了?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

理解(我认为)RESTful-ness背后的基本思想。在语义上使用HTTP方法 - GET获取,PUT put,DELETE删除等等......对吗?认为我理解REST背后的想法,但我认为我对HTTP实现的细节感到困惑。休息背后的驱动理念是什么,为什么这成为一件重要的事情?人们实际上已经使用了很长时间,在我的手电筒从未照过的互联网的一角?



Google Talk提到Atom Publishing Protocols与RESTful实现有很多协同作用。有什么想法吗?

I understand (I think) the basic idea behind RESTful-ness. Use HTTP methods semantically - GET gets, PUT puts, DELETE deletes, etc... Right? thought I understood the idea behind REST, but I think I'm confusing that with the details of an HTTP implementation. What is the driving idea behind rest, why is this becoming an important thing? Have people actually been using it for a long time, in a corner of the internets that my flashlight never shined upon?


The Google talk mentions Atom Publishing Protocols having a lot of synergy with RESTful implementations. Any thoughts on that?

推荐答案

这就是REST的样子:

This is what REST might look like:

POST /user
fname=John&lname=Doe&age=25

服务器响应:

201 Created
Location: /user/123

将来,您可以检索用户信息:

In the future, you can then retrieve the user information:

GET /user/123

服务器响应(假设XML响应):

The server responds (assuming an XML response):

200 OK
<user><fname>John</fname><lname>Doe</lname><age>25</age></user>

要更新:

PUT /user/123
fname=Johnny

这篇关于REST究竟是什么意思?它是什么,为什么它现在变大了?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆