-
协议
https
-
域名
https://www.baidu.com/api
-
版本
https://www.baidu.com/v1
-
路径
https://www.baidu.com/v1/blogs
-
方法

- 数据过滤

- 状态码
- 返回结果

-
返回的数据格式
尽量使用 JSON,避免使用 XML。
总结:
- 看 url 就知道要什么
- 看 http method 就知道干什么
- 看 http status 就知道结果如何
协议
https
域名
https://www.baidu.com/api
版本
https://www.baidu.com/v1
路径
https://www.baidu.com/v1/blogs
方法
返回的数据格式
尽量使用 JSON,避免使用 XML。
总结:
- 看 url 就知道要什么
- 看 http method 就知道干什么
- 看 http status 就知道结果如何