- Building RESTful Web services with Go
- Naren Yellavula
- 140字
- 2021-07-02 20:14:03
4xx family (client error)
These are the standard error status codes which the client needs to interpret and handle further actions. These have nothing to do with the server. A wrong request format or ill-formed REST method can cause these errors. Of these, the most frequent status codes API developers use are 400, 401, 403, 404, and 405:
- 400 (Bad Request) is returned when the server cannot understand the client request.
- 401 (Unauthorized) is returned when the client is not sending the authorization information in the header.
- 403 (Forbidden) is returned when the client has no access to a certain type of resources.
- 404 (Not Found) is returned when the client request is on a resource that is nonexisting.
- 405 (Method Not Allowed) is returned if the server bans a few methods on resources. GET and HEAD are exceptions.
推薦閱讀
- EJB 3.1從入門到精通
- Mastering Node.js(Second Edition)
- 微商之道
- 物聯網(IoT)基礎:網絡技術+協議+用例
- MERN Quick Start Guide
- C++黑客編程揭秘與防范
- 異構基因共表達網絡的分析方法
- TCP/IP入門經典(第5版)
- Hands-On Full Stack Development with Spring Boot 2 and React(Second Edition)
- 互聯網安全的40個智慧洞見:2015年中國互聯網安全大會文集
- Wireshark網絡分析就這么簡單
- Mastering TypeScript 3
- 6G無線網絡空口關鍵技術
- 一本書讀懂TCP/IP
- 網絡安全之道