Requesttarget
Request-target, often written as request-target in RFCs, is the component of an HTTP request line that identifies the resource the client wishes to access. In HTTP/1.1, a request line has the form: method, request-target, HTTP-version. The request-target conveys which resource should be retrieved or acted upon and is interpreted by the server to map the request to a resource.
- Origin-form: the common form for direct client requests, such as GET /path/to/resource?query HTTP/1.1, where the target
- Absolute-form: the full URL, such as GET http://www.example.org/resource HTTP/1.1, where the target includes the scheme, host,
- Authority-form: used by proxies for tunnel establishment, e.g., CONNECT www.example.com:443 HTTP/1.1; the target specifies the authority
- Asterisk-form: used with OPTIONS, e.g., OPTIONS * HTTP/1.1, where the target does not point to a specific
In HTTP/2 and HTTP/3, the request-target is carried in protocol-specific headers (for example, the :path pseudo-header
Servers parse the request-target to locate resources, apply routing, and enforce security policies. Proxies and gateways
See also: RFC 7230, HTTP semantics, HTTP/2 and HTTP/3 mappings.