Do REST API URLs have to look like this?

后端 未结 7 701
孤独总比滥情好
孤独总比滥情好 2020-12-28 18:36

Is it true that to implement a RESTful API, one has to implement a URL structure that looks like this

http://example.com/post/
http://example.com/post/123
         


        
7条回答
  •  礼貌的吻别
    2020-12-28 19:05

    The REST concept is really based on the fact that it is URL driven, and not driven by large data-blobs. With REST, you don't have to pass a giant soap request to invoke a method - your method call/object creation/whatever you want to do is invoked simply by the URL, and the verb you used vs that URL.

提交回复
热议问题