20180919-RESTful api

2018-09-19  本文已影响0人  LiuYanPin

https://www.restapitutorial.com/
1.RESTful-style

2.HTTP动作

POST http://www.example.com/customers
POST http://www.example.com/customers/12345/orders
GET http://www.example.com/customers/12345
GET http://www.example.com/customers/12345/orders
GET http://www.example.com/buckets/sample
PUT http://www.example.com/customers/12345
PUT http://www.example.com/customers/12345/orders/98765
PUT http://www.example.com/buckets/secret_stuff
DELETE http://www.example.com/customers/12345
DELETE http://www.example.com/customers/12345/orders
DELETE http://www.example.com/bucket/sample
PATCH http://www.example.com/customers/12345
PATCH http://www.example.com/customers/12345/orders/98765
PATCH http://www.example.com/buckets/secret_stuff

3.HTTP状态码

上一篇 下一篇

猜你喜欢

热点阅读