HTTP的典型结构
Request
- URL
- Method
- GET
- POST
- PUT
- PATCH
- DELETE
- HEAD:获取资源的元数据
- OPTIONS:获取信息,关于资源的哪些属性是客户端可以改变的
- Query Parameters
- for
GET
query string
=qs
=query parameters
=params
=query component
- /xxx/xxx?key1=value1&key2=value2
- for
POST
- Headers
- Content-Type
application/json
application/json;charset=UTF-8
- Accept
- Authorization
Bearer 725a7c44b76c45ab95152bcee014ae6e_1
- Other
- Cookie
- LocalStorage
- SessionStorage
响应Response
- Status
- Informational - 1xx
- Successful - 2xx
- Redirection - 3xx
- Client Error - 4xx
- 400 BAD_REQUEST
- 401 UNAUTHORIZED
- 403 FORBIDDEN
- 404 NOT_FOUND
- Server Error - 5xx
- 500 INTERNAL_SERVER_ERROR
- Body
- Other