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 ...
🌐
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 ...
🌐
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:
🌐
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.
Find elsewhere
🌐
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.
🌐
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" }
🌐
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
🌐
mabl help
help.mabl.com › hc › en-us › articles › 19078205331348-JSON-structure-and-syntax
JSON structure and syntax – mabl help
3 weeks ago - A JSON object contains one or more properties that are expressed as key-value pairs, separated by commas and enclosed with curly braces { }. For example, an API call that authenticates a user may return the following response body to indicate that a user is logged in:
🌐
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):
🌐
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 ...
🌐
Baeldung
baeldung.com › home › http client-side › making a json post request with httpurlconnection
Making a JSON POST Request With HttpURLConnection | Baeldung
May 11, 2024 - The Apache HTTP Client is a very robust library, suitable for both simple and advanced use cases when testing HTTP endpoints. Check out our guide covering basic request and response handling, as well as security, cookies, timeouts, and more: ... In this tutorial, we’ll demonstrate how to make a JSON POST request using HttpURLConnection.
🌐
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...