Справочник методов HTTP

Полное руководство по методам HTTP — GET, POST, PUT, DELETE, PATCH и другие.

GETБезопасный: ДаИдемпотентный: Да

Retrieves a resource without modifying server state. The most commonly used HTTP method.

Случай использования: Fetching a webpage, API data, or file.

POSTБезопасный: НетИдемпотентный: Нет

Submits data to the server to create a new resource or trigger a process.

Случай использования: Form submission, creating a new record via API.

PUTБезопасный: НетИдемпотентный: Да

Replaces the entire target resource with the request payload.

Случай использования: Updating a user profile — replaces all fields.

PATCHБезопасный: НетИдемпотентный: Нет

Partially modifies a resource — only sends the fields that need updating.

Случай использования: Updating only the email of a user record.

DELETEБезопасный: НетИдемпотентный: Да

Removes the target resource from the server.

Случай использования: Deleting a blog post or API record.

HEADБезопасный: ДаИдемпотентный: Да

Same as GET but returns only headers, not the response body.

Случай использования: Checking if a URL exists or getting Content-Length.

OPTIONSБезопасный: ДаИдемпотентный: Да

Describes the communication options for the target resource. Used in CORS preflight.

Случай использования: CORS preflight requests.

TRACEБезопасный: ДаИдемпотентный: Да

Performs a message loop-back test along the path to the target resource.

Случай использования: Debugging proxy chains (rarely used, often disabled).

CONNECTБезопасный: НетИдемпотентный: Нет

Establishes a tunnel to the server identified by the target resource.

Случай использования: HTTPS tunneling through HTTP proxies.

Comments & Feedback

Comments are powered by Giscus. Sign in with GitHub to leave a comment.