get-request tagged requests and articles

Categorized request examples and articles tagged with [get-request] keyword
GET Request Example
An example of sending a GET request to the server to get a resource at the specified URL. In this GET request example, 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 has returned HTML for this GET request.
get-url get-html get-request

Curl Request With Bearer Token Authorization Header
An example of a Curl request with Bearer Token Authorization header. The bearer token is sent to the server in the 'Authorization: Bearer {token}' authorization 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.
curl get-request bearer-token authorization authorization-header request-header

GET JSON String
An example of how to request a JSON string from the server. The 'Accept: application/json' request header tells the server that the client expects a JSON. The 'Content-Type: application/json' response header informs that the server returned a JSON string.
json get-request request-header rest-api get-json

Get URL with Curl
Curl command to send a GET request to an URL to retrieve the page's body and HTTP headers. The 'Accept: */*' request header is added automatically by Curl. The server informs the client that the response body contains an HTML with 'Content-Type: text/html' response header.
curl get-html get-url 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.
get-request bearer-token authorization authorization-header request-header form

Curl Command to GET a JSON String
An example of a Curl command to get a JSON string from the REST API endpoint. The 'Accept: application/json' request header is passed to the server with the Curl -H command-line parameter and tells the server that the client expects JSON media type.
curl json get-json get-request rest-api request-header

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.
ip-address get-request rest-api bearer-token api-token ipinfo

GET Request With Basic Server Authentication
This page shows how to send 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 :.
get-request basic-authentication credentials server-authentication authorization

GET XML String
An example of how to request an XML string from the server. 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-xml xml get-request soap-api request-header

Current Weather Data for the Selected City via REST API
This page shows how to get the current weather data for the selected city by sending a REST API request to the OpenWeather API endpoint. The weather REST API key is passed in the "openweathermap_apikey" URL parameter. The city name is passed in the 'q' URL parameter. The weather REST API supports HTTP GET requests.
rest-api get-request openweather weather-data city-wather openweather-api weather-api

Curl Command With Basic Server Authentication Header
An example of a Curl command with the basic server authentication credentials in the request header. For the basic server authentication, the 'Authorization: Basic {credentials}' header is added to the request. Where the {credentials} is a Base64 encoded string of login and password pair joined by a single colon :.
curl basic-authentication server-authentication get-request authorization

Latest Foreign Exchange Rates via REST API
This page shows how to get the latest foreign exchange rates (forex) by sending a GET request to the Fixer.io REST API. Replace {fixer_apikey} with your own Fixer API key.
rest-api get-request forex exchange-rates fixer fixer-api

Curl Command to GET an XML String
An example of a Curl command to get and an XML string from the API endpoint. 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.
curl xml get-request get-xml soap-api request-header

Send Custom Headers with Curl
This page shows how to send a Curl command with custom request headers.
curl get-request custom-header request-header

GET Request Like Google Chrome
This page demonstrates how to send a GET request with a custom User-Agent header that emulates a request from Google Chrome.
get-request custom-header user-agent http-header google-chrome request-header get-method browser

GET Request With Custom Headers
This page shows how to send a GET request with custom request headers.
get-request custom-header request-header get-method

Curl Command with CORS Headers
This page shows how to send a Curl request with CORS Origin header (Cross-Origin Resource Sharing request).
curl cors get-request request-header get-method

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.
rest-api get-request unsplash unsplash-api photos-api popular-photos

Send Custom Headers With GET Request
This page shows how to send a GET request with custom HTTP headers to the API endpoint. Try it yourself with ReqBin online HTTP Client.
http-headers http-request get-request custom-header request-header get-method

GET Request to Retrieve a JSON
This page demonstrates how to send a GET request to REST API endpoint with Accept: application/json and Bearer token in authorization headers.
get-request json rest-api get-method

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.
rest-api get-request nasa nasa-api astronomy-picture

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.
get-request unsplash rest-api access-key photo-details photo-download unsplash-api

GET Request Like Mozilla Firefox
This page demonstrates how to send a GET request with a custom User-Agent header that emulates a request from Mozilla Firefox.
get-request custom-header user-agent mozilla-firefox request-header browser

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.
rest-api get-request unsplash search-photos unsplash-api

GET Request with CORS Headers
This page demonstrates how to send a CORS request with the Origin header (Cross-Origin Resource Sharing request).
get-request cors origin-header get-method request-header

GET Request with Cookies in Header
This page shows how to send a GET request with HTTP cookies in the request header.
get-request cookies request-header get-method

Close Connection Example
This page shows how to tell the server that the client doesn't want to keep the connection open by sending 'Connection: close' header.
connection-close http-headers connection-header get-request get-method request-header

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.
rest-api nasa get-request nasa-api nasa-image nasa-video

GET Request Without Accept-Encoding Header
If you do not specify Accept-Encoding in the request headers or the server does not support compression, the response body will not be compressed.
get-request accept-encoding request-header get-method

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.
ip-address get-request ipinfo ipinfo-api country-code code-by-ip

GET Request With Accept-Encoding Header
This page shows how to send a GET request with an Accept-Encoding: gzip header, which tells the server to send gzip-encoded content.
get-request accept-encoding gzip-encoded request-header get-method rest-api

Send CORS Request with Credentials
This page demonstrates how to send a CORS request with the Origin header and HTTP cookies in the header (Cross-Origin Resource Sharing request).
cors credentials origin-header cookies get-request get-method

Curl Command with HTTP Headers to Prevent Caching
An example of Curl command with HTTP headers to prevent caching that works across all servers and proxies.
curl caching prevent-caching request-header get-request get-method

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.
rest-api nasa get-request nasa-api nasa-mars-api mars-photos

HTTP Headers to Prevent Caching
The correct minimum set of HTTP headers to prevent caching that works across all servers and proxies.
http-headers prevent-caching proxy request-header get-request get-method caching

Curl Command with Cookies in Header
This page shows how to send a Curl request with HTTP cookies in the request header.
curl cookies get-request request-header get-method

Current Weather Data by Geographic Coordinates via REST API
This page shows how to get the current weather data by geographic coordinates by sending a GET request to the OpenWeather REST API. Replace {openweathermap_apikey} with your own API key.
rest-api openweather get-request weather-api weather-data openweather-api

Current Weather Data by ZIP Code via REST API
This page shows how to get the current weather data by ZIP code by sending a GET request to the OpenWeather REST API. Replace {openweathermap_apikey} with your own API key.
rest-api get-request openweather weather-data weather-api openweather-api

GET Request With Bearer Token Authorization Header
This page demonstrates how to send a GET request to an HTTP API endpoint with Accept: application/json and Bearer token authorization headers.
get-request json bearer-token authorization-header accept-header rest-api request-header authorization

GET Request with Cookies in header to get JSON
This page shows how to send a GET request with HTTP cookies in the header to get JSON. Try it yourself with ReqBin online HTTP Client.
get-request cookies json http-headers get-method rest-api request-header

GET Request with Cache-Control Headers
An example of sending a GET request with the correct set of cache-control headers to prevent caching. Try it yourself with the ReqBin online HTTP client.
get-request cache-control prevent-caching request-headers get-method caching

Curl GET JSON Example
This page shows how to send a Curl command to get JSON from the server.
curl json get-request get-json rest-api get-method request-header

Curl REST API GET Example
An example of a Curl command for sending a GET request to the REST API endpoint to get a JSON. Try it yourself with ReqBin online Curl Client.
curl json get-request request-header rest-api

GET Request with Basic Authentication Credentials
This page shows how to make a GET request with Basic authentication credentials in the header. Try it yourself with ReqBin online HTTP Client.
get-request basic-authentication credentials authorization

HTTP Request with Bearer Auth Credentials
This page shows how to make an HTTP request with a Bearer authentication credentials. Try it yourself with ReqBin online HTTP Client.
http-request bearer-token credentials get-request authorization

GET Request With Pragma Header
An example HTTP GET request with the custom 'Pragma: no-cache' header that tells the server and intermediate caches to provide a fresh version of the resource.
http-request get-request custom-header pragma pragma-header get-method get-html

GET Request with Bearer Authentication Credentials
This page shows how to make a GET request with Bearer authentication credentials in the header. Try it yourself with ReqBin online HTTP Client.
get-request bearer-token credentials rest-api get-method authorization

Convert Curl to HTTP GET Request
Convert Curl command to the HTTP GET request. See the GET Header and body on the Raw tab.
curl get-method get-request rest-api

GET Request with Cookie Header
This page shows how to send a GET request with the HTTP Cookie header. Try it yourself with the ReqBin online HTTP client.
get-request http-headers cookies get-method request-header

HTTP Request with Basic Auth Credentials
This page shows how to make an HTTP request with Basic auth credentials. Try it yourself with ReqBin online HTTP Client.
http-request basic-auth credentials authorization get-request

GET Request with Custom Authorization Header
This page shows how to make a GET request with a custom authorization header. Try it yourself with ReqBin online HTTP Client.
get-request custom-header authorization-header custom-authorization authorization

GET With Cache-Control
This page shows the result of the GET request with the Cache-Control HTTP Header. Try it yourself with ReqBin online HTTP Client.
get-request cache-control http-headers

GET Request With CORS Header
An example of sending a GET request with the CORS headers. Try it yourself with the ReqBin online HTTP client.
get-request cors get-method request-header origin-header

REST API GET Example
An example of sending a GET request to the REST API endpoint to get a JSON. Try it yourself with ReqBin online HTTP Client.
get-request rest-api json request-header

Curl GET Request
An example of making a GET request with Curl. The '-H "Accept: application/json"' Curl command-line parameter appends 'Accept: application/json' request header and informs the server that Curl client expects a JSON. The 'Content-Type: application/json' response header informs the Curl client that the server returned a JSON string.
curl get-request request-header

GET JSON with Curl
This is a live example of retrieving a JSON string from a REST API endpoint using Curl. Try it yourself with ReqBin online Curl client.
curl json get-request rest-api request-header

GET Request
An example of sending a GET request to the server.
get-request json rest-api

HTTP GET Request
The HTTP GET method is used to request a resource from the server. The GET requests cannot have a message body but you still can send data to the server using the URL parameters. HTTP GET requests should only receive data (the server must not change its state). If you want to change data on the server, use POST, PUT, PATCH or DELETE methods.
http-method http-request get-json get-xml get-request request-example get-example