What are RESTful Web Services

后端 未结 2 901
我寻月下人不归
我寻月下人不归 2021-02-02 03:28

I\'ve tried to read about what RESTful webservices from Wikipedia etc but I must admit I don\'t get it. There is a film in which Denzell Washington says \"explain it to me like

2条回答
  •  一整个雨季
    2021-02-02 03:42

    When I first started with REST, I too had some difficulty getting the "big picture", despite all the documentation out there. Anyways, here's my brief take on REST:

    • REST is an architectural style for building web services.

    • REST is built on top of HTTP. Your web service exposes Resources in the form of URIs. Your service allows clients to act upon your service using the standard HTTP verbs (GET=read the resource, POST=create the resource, PUT=update the resource, DELETE=delete the resource).

    • REST has gained significant momentum in the past few years due largely to (a) Its simplicity over other styles like SOAP. (b) The ubiquity of HTTP. Because HTTP is a time-tested standard, most languages have build-in or 3rd-party HTTP support. You cannot say the same thing about SOAP.

    • Because REST is a style and not a strict protocol/specification, there is lots of room for interpretation. Many public services that call themselves "REST" do not follow the style to the letter.

提交回复
热议问题