原文:
REST (Representational State Transfer) is an architectural style for designing web APIs. A well-designed RESTful API treats everything as a resource, identified by URLs. HTTP methods map to CRUD operations: GET retrieves, POST creates, PUT replaces, and DELETE removes. Statelessness means each request contains all the information needed to process it, which improves scalability. Proper status codes communicate results clearly — 200 for success, 404 for not found, and 500 for server errors.
翻译:
REST(表述性状态转移)是设计Web API的架构风格。设计良好的RESTful API将一切视为资源,通过URL标识。HTTP方法映射到CRUD操作:GET检索、POST创建、PUT替换、DELETE删除。无状态性意味着每个请求都包含处理它所需的全部信息,这提高了可扩展性。适当的状态码清晰地传达结果——200表示成功,404表示未找到,500表示服务器错误。
词汇注释:
