get-request tagged requests and articles

Categorized request examples and articles tagged with [get-request] keyword
HTTP GET Request Example
An example of sending an HTTP GET request to the server to get a resource at the specified URL. In this HTTP GET request example, the Accept: */* request header tells the server that the client accepts all media types. The Content-Type: text/html response header informs the client that the server returned HTML for this HTTP GET request.

GET Request With Bearer Token Authorization Header
An example of sending a GET request with Bearer Token authorization header. The bearer token is sent to the server in the 'Authorization: Bearer {token}' request header. The 'Accept: application/json' header tells the server that the client expects a JSON. The server informs the client that it returned a JSON with 'Content-Type: application/json' response header.

How do I request JSON from the server?
To request JSON from a URL, you need to send an HTTP GET request to the server and provide the Accept: application/json request header. The Accept header tells the server that our client is expecting JSON. The server informs the client that it has returned JSON with a Content-Type: application/json response header. In this JSON request example, we are making a GET request to the ReqBin echo URL.

Curl Get URL
An example of getting a URL with Curl. The target URL is passed as the second command line parameter. Curl automatically selects the GET method to use unless the -X, --request, and -d command-line options are used. The Accept: */* header is automatically added by Curl to the request header.

How do I get JSON from a REST API endpoint?
To receive JSON from a REST API endpoint, you must send an HTTP GET request to the REST API server and provide an Accept: application/json request header. The Accept header tells the REST API server that the API client expects JSON. In this REST API GET example, we are making a GET request to the ReqBin echo REST API endpoint. The Content-Type: application/json response header indicates that the REST API server returned JSON.

Curl GET XML Example
An example of a Curl command to get and an XML data from the API endpoint. The Accept: application/xml request header tells the server that the client expects an XML response. The Content-Type: application/xml response header informs the client that the server returned an XML string.

Curl GET Request
An example of making a GET request using Curl. Curl automatically selects the GET method unless the -X, --request, or -d command-line options are passed. The target URL is passed as the first command-line parameter. The second command-line parameter tells the server that the Curl client is expecting JSON.

GET Request With Basic Server Authentication
An example of sending a GET request with the basic server authentication credentials. For the basic server authentication, the Authorization: Basic {credentials} header is added to the request. Where the {credentials} is a Base64 encoded string of username and password pair joined by a single colon :

IP Address Details via REST API
This page shows how to get details for the selected IP addresses by sending a GET request to the IPInfo.io REST API. Replace {ipinfo_apikey} bearer token with your own API token.

GET XML Example
An example of getting an XML data from a website. The Accept: application/xml request header tells the server that the client expects an XML. The Content-Type: application/xml response header informs the client that the server returned an XML string.

GET Request With Custom Headers
An example of sending a custom request header to the server. In this example, the name of the custom header is X-Real-IP and the value is 39.40.130.50.

Astronomy Picture of the Day via REST API
Get the astronomy picture of the day (APOD) by sending a GET request to the Nasa.gov REST API. Replace {nasa_apikey} with your own Nasa API key.

Search Photos via REST API
Get a page of search results for photos sorted by relevance by sending a GET request to the Unsplash.com REST API. Replace {unsplash_apikey} with your own Unsplash Access key.

Get Country Code by IP Address via REST API
This page shows how to get the country code by IP address by sending a GET request to the IPInfo.io REST API. Replace {ipinfo_apikey} bearer token with your own API token.

List of Popular Photos via REST API
Get a page with a list of photos sorted by popularity by sending a GET request to the Unsplash.com REST API. Replace {unsplash_apikey} with your own Unsplash Access key.

GET Request to Retrieve a JSON
This page shows how to send a GET request to the REST API endpoint to retrieve a JSON file. The Accept: application/json header tells the server that the client is expecting a JSON response.

Photo Details and Download Links via REST API
Get complete information of a photo, including size, author name, location, and download links by sending a GET request to the Unsplash.com REST API. Replace {unsplash_apikey} with your own Unsplash Access key.

NASA Image and Video Library via REST API
Access the NASA Image and Video Library by sending a GET request to the Nasa.gov REST API. Replace {nasa_apikey} with your own Nasa API key.

Mars Rover Photos via REST API
Get Mars photos gathered by NASA's Curiosity, Opportunity, and Spirit rovers on Mars by sending a GET request to the Nasa.gov REST API. Replace {nasa_apikey} with your own Nasa API key.

Curl HTTP GET Example
An example of making an HTTP GET request with Curl. In this Curl HTTP GET example, we do not explicitly pass the GET method anywhere, since Curl automatically selects the HTTP GET method unless the -X, --request, or -d command-line options are passed. To explicitly tell Curl to use the HTTP GET method, pass the -X GET command-line option.

GET Request Online
An example of making a GET request to an HTTP API endpoint. Quickly and easily send GET requests online with ReqBin Online API Client and inspect server responses.

Simulate GET Request
Simulate GET requests to API endpoints with ReqBin Online HTTP Client. Check server status codes, response times, and sizes. Validate returned JSON and XML strings.

HTTP GET Example
An example of an HTTP GET request. In this HTTP GET example, the GET request is sent to the https://reqbin.com/echo HTTP API endpoint. The Accept: */* request header tells the server that the client accepts all types of media. The Content-Type: text/html response header informs the client that the server returned HTML.

What is HTTP GET Request Method?
The HTTP GET method is one of the most commonly used HTTP methods. It is used to request a resource from the server, cannot have a message body, and must not modify data on the server.