Answers for "python respond json to api"

3

python convert requests response to json

import json
import requests

response = requests.get(...)
json_data = json.loads(response.text)
Posted by: Guest on May-30-2020
0

python json web request

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
Posted by: Guest on July-14-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language