I recommend using the awesome requests library:

import requests

url = 'http://maps.googleapis.com/maps/api/directions/json'

params = dict(
    origin='Chicago,IL',
    destination='Los+Angeles,CA',
    waypoints='Joplin,MO|Oklahoma+City,OK',
    sensor='false'
)

resp = requests.get(url=url, params=params)
data = resp.json() # Check the JSON Response Content documentation below

JSON Response Content: https://requests.readthedocs.io/en/master/user/quickstart/#json-response-content

Answer from Zach Kelling on Stack Overflow
🌐
Atlassian
developer.atlassian.com › server › crowd › json-requests-and-responses
JSON requests and responses
curl -i -u application_name:application_password --data '{"value": "my_password"}' http://localhost:8095/crowd/rest/usermanagement/1/authentication?username=my_username --header 'Content-Type: application/json' --header 'Accept: application/json' ... { "reason" : "INVALID_USER_AUTHENTICATION", ...
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › API › Request › json
Request: json() method - Web APIs | MDN
November 7, 2025 - The request body cannot be parsed as JSON. ... const obj = { hello: "world" }; const request = new Request("/myEndpoint", { method: "POST", body: JSON.stringify(obj), }); request.json().then((data) => { // do something with the data sent in the request });
🌐
ReqBin
reqbin.com › req › 4rwevrqh › post-json-example
How do I post JSON to the server?
January 16, 2023 - Additionally, you can pass an "Accept: application/json" header, which tells the server that the client is expecting JSON data. In this POST JSON example, we send JSON data to the ReqBin echo URL with the ...
🌐
ReqBin
reqbin.com › req › gzezk8d5 › json-response-example
How do I return JSON in response?
In this JSON response example, we send a request to the ReqBin echo URL and provide the "Accept: application/json" request header to tell the server that the client is expecting JSON.
🌐
JSON
json.org › JSONRequest.html
JSONRequest
April 17, 2006 - Example: requestNumber = JSONRequest.get( "https://json.penzance.org/request", function (requestNumber, value, exception) { if (value) { processResponse(value); } else { processError(exception); } } ); After JSONRequest.get has verified the parameters, it will queue the request and return the ...
🌐
ReqBin
reqbin.com › req › 5nqtoxbx › get-json-example
How to get JSON from URL?
January 17, 2023 - JSON.stringify() - converts a JavaScript object to a JSON string. An example of an HTTP GET request to fetch JSON data from a ReqBin echo URL.
🌐
Quackit
quackit.com › json › tutorial › json_with_http.cfm
How to use JSON to do an HTTP Request
JSON is most commonly used in asynchronous HTTP requests. This is where an application pulls data from another application via an HTTP request on the web. In this example, we'll use artists.txt, which contains the following data:
Find elsewhere
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › API › Response › json
Response: json() method - Web APIs | MDN
... const myList = document.querySelector("ul"); const myRequest = new Request("products.json"); fetch(myRequest) .then((response) => response.json()) .then((data) => { for (const product of data.products) { const listItem = document.createElement("li"); listItem.appendChild(document.creat...
🌐
ReqBin
reqbin.com › req › 2xhbguy8 › json-payload-example
How do I send JSON Payload to the server?
January 13, 2023 - To send the JSON payload to the ... application/json" request header. If the client expects a response from the server in JSON format, it also needs to send the "Accept: application/json" header to the server. In this JSON Payload Example, we send JSON to the ReqBin ...
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Learn_web_development › Core › Scripting › JSON
Working with JSON - Learn web development | MDN
August 18, 2025 - To obtain the JSON, we use an API called Fetch. This API allows us to make network requests to retrieve resources from a server via JavaScript (e.g., images, text, JSON, even HTML snippets), meaning that we can update small sections of content without having to reload the entire page.
🌐
ReqBin
reqbin.com › req › v0crmky0 › rest-api-post-example
How do I post JSON to a REST API endpoint?
To post JSON to a REST API endpoint, you must send an HTTP POST request to the REST API server and provide JSON data in the body of the POST message. You must also specify the data type using the Content-Type: application/json request header. In this REST API POST example, we also send the Accept: application/json request header to tell the REST API server that the API client expects JSON in response...
🌐
Progress
documentation.progress.com › output › Corticon › 5.6.1 › html › corticon › sample-json-request-and-response-messages.html
Sample JSON request and response messages
Your installation provides a sample JSON request as well as an API test to run the request. For an example of running a Corticon JSON-formatted request on Corticon Java server, see Path 4: Using JSON/RESTful client to consume a Decision Service on Java Server, and on Corticon Server for .NET, see Path 4: Using JSON/RESTful client to consume a Decision Service on .NET server.
🌐
W3Schools
w3schools.com › js › js_json_http.asp
JSON XMLHttpRequest
AJAX Intro AJAX XMLHttp AJAX Request AJAX Response AJAX XML File AJAX PHP AJAX ASP AJAX Database AJAX Applications AJAX Examples JS JSON
🌐
Informatica
docs.informatica.com › reference material › rest api reference › informatica intelligent cloud services rest api › header and body configuration › json format example
JSON format example
POST https://dm-us.informaticacloud.com/saas/public/core/v3/login Content-Type: application/json Accept: application/json { "username": "user@informatica.com", "password": "mypassword" }
🌐
Apache Solr
solr.apache.org › guide › solr › latest › query-guide › json-request-api.html
JSON Request API :: Apache Solr Reference Guide
JSON objects are typically sent in the request body, but they can also be sent as values for json-prefixed query parameters. This can be used to override or supplement values specified in the request body. For example the query parameter json.limit=5 will override any limit value provided in ...
🌐
Progress
docs.progress.com › bundle › corticon-deployment › page › Sample-JSON-request-and-response-messages.html
Sample JSON request and response messages
January 28, 2025 - Skip to main contentSkip to search · Powered by Zoomin Software. For more details please contactZoomin
🌐
Microsoft Learn
learn.microsoft.com › en-us › answers › questions › 1180617 › send-a-request-to-a-restapi-with-json
Send a request to a restapi with json - Microsoft Q&A
If you are happy with one of the answers, I'd suggest you accept one of the answers from this question and later ask a new question focusing on sending request using RestSharp. This keeps the current post focused on Microsoft libraries and your new post focused on RestSharp, which makes the posts much more useful. ... Hi @Claude Larocque ,Welcome to Q&A. You can use httpclient and System.Text.Json. Here is a winform example I wrote (.Net Framework 4.8):