3

Possible Duplicates:
What is REST?[closed]
Does the WCF REST WebChannelFactory client support REST services that use redirects?
What am I not understanding about REST?

What is the REST command in HTTP? I know GET and POST, which used to get or post data to/from the server. But what exactly REST does?

Community
  • 1
  • 1
Alon Gubkin
  • 56,458
  • 54
  • 195
  • 288

7 Answers7

8

REST is not a valid HTTP command, those are limited to GET, POST, PUT, OPTIONS, HEAD and DELETE, TRACE and CONNECT (at least in HTTP/1.1).

REST is representational state transfer, which is something that happens at a higher level than the HTTP commands. See here for the gory details but it's basically the description of what made the web work, many clients interacting with servers but spending most of their time interacting with the users and not putting a load on the infrastructure.

The client only puts load on the infrastructure when it needs to change states.

paxdiablo
  • 854,327
  • 234
  • 1,573
  • 1,953
4

REST is not a valid HTTP Verb. Rest stands for REpresentational State Transfer. You can find out the basics of REST here...

Restore the Data Dumps
  • 38,967
  • 12
  • 96
  • 122
2

Actaully REST makes use of HTTP but is not a command or such in HTTP.

Check this wikipedia article.

EDIT:

Agreeing to the comments I'd recommend this SO search.

Community
  • 1
  • 1
KB22
  • 6,899
  • 9
  • 43
  • 52
  • 1
    And REST can well be implemented without HTTP as well. – mjv Oct 26 '09 at 14:19
  • 1
    It has been documented somewhere else in SO that the wiki REST article is erroneous. A search of SO will bring up a few posts with links to other more reputable sources – non sequitor Oct 26 '09 at 15:09
1

REST is a style of programmatic interaction which uses standard HTTP methods such as GET, POST and PUT. So You don't actually have a "REST" method, rather you use HTTP methods in a REST-ful way.

djna
  • 54,992
  • 14
  • 74
  • 117
1

Try Wikipedia. REST is a type of architecture. DELETE, GET, PUT are some of the methods defined as part of the HTTP spec.

dirkgently
  • 108,024
  • 16
  • 131
  • 187
1

There seem to be some confusion. REST is not an HTTP method.

It is possible however to implement RESTful protocols over HTTP, and this can be done regardless of the GET vs. POST methods used.

mjv
  • 73,152
  • 14
  • 113
  • 156
0

REST is an architecture described in this article: Dissertion on REST

RESTFUL web services use basic HTTP verbs to make stateless calls. The service structure has to use nouns, for example:

http://myhost/pictures/3

would return a picture with an ID of 3. This is a basic example. Most restful services are structured similiarly to this.

Egg
  • 246
  • 1
  • 5
  • 16
  • Actually a better URL in that case would be http://myhost/pictures/3 – Andrew Swan Oct 28 '09 at 23:21
  • Just to clarify Andrew's comment: the top level domain would be your website, for example http://myrestexample.com followed by the web services provided. For example: http://myrestexample.com/services/v1/pictures/3. – jcrowson Oct 31 '11 at 13:25