http and rest

1 How does http relate to REST

HTTP is an application layer protocol for sending and receving messag. We can use GET method for all interaction

REST is a specification that dicates how distributed system on web should commicate 

REST is a way to impement and use http protocol.

2 How does WEB related to REST 

REST is underlaying architecutre of WEB

REST Rules:

The method information should be expressed iin the HTTP verb (e.g GET, PUT). I.e it decribe what clinet want server to do (method)

Socping information should go in URL. (Delete api/user:userid). i.e it describe what data client want server to deal with (socpinp)

 

 

猜你喜欢

转载自www.cnblogs.com/anyu686/p/12729820.html