requests
Requests are messages sent by a client to a server to obtain a resource or instruct the server to perform an action. The most common protocol for web requests is HTTP. An HTTP request consists of a request line with a method, a request-target (URL), and the HTTP version; followed by headers, a blank line, and an optional body. Methods indicate the action; GET retrieves data, POST submits data, PUT and PATCH modify resources, DELETE removes them, while HEAD and OPTIONS query metadata. Requests include a Host header and may carry authentication tokens, content types, and other metadata. The body is used when sending data, such as form submissions or JSON.
Upon receiving a request, a server responds with a status code, a reason phrase, and response headers,
The requests library is a popular open-source HTTP client for Python. The library offers a high-level API
Related concepts include client-side request APIs in web browsers, such as the Fetch API and XMLHttpRequest