GET request method
Baseline
Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
The
GET HTTP method requests a representation of the specified resource.
Requests using GET should only be used to request data and shouldn't contain a body.Note:
The semantics of sending a message body in
GET requests are undefined.
Some servers may reject the request with a 4XX client error response.| Request has body | No |
|---|---|
| Successful response has body | Yes |
| Safe | Yes |
| Idempotent | Yes |
| Cacheable | Yes |
| Allowed in HTML forms | Yes |
Syntax
<request-target>-
Identifies the target resource of the request when combined with the information provided in the
Hostheader. This is an absolute path (e.g.,/path/to/file.html) in requests to an origin server, and an absolute URL in requests to proxies (e.g.,http://www.example.com/path/to/file.html). <query>Optional-
An optional query component preceded by a question-mark
?. Often used to carry identifying information in the form ofkey=valuepairs.
Examples
Successfully retrieving a resource
The following
GET request asks for the resource at example.com/contact:The server sends back the resource with a
200 OK status code, indicating success:Specifications
| Specification |
|---|
| HTTP Semantics # GET (external) |
Browser compatibility
|
Chrome
|
Edge
|
Firefox
|
Opera
|
Safari
|
Chrome Android
|
Firefox for Android
|
Opera Android
|
Safari on iOS
|
Samsung Internet
|
WebView Android
|
WebView on iOS
|
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Legend
Tip: you can click/tap on a cell for more information.
Full support
See also
- HTTP request methods
- HTTP response status codes
- HTTP headers
RangeheaderPOSTmethod

