python json web request

Solutions on MaxInterview for python json web request by the best coders in the world

showing results for - "python json web request"
Mordecai
13 Aug 2016
1import requests
2
3url = 'http://maps.googleapis.com/maps/api/directions/json'
4
5params = dict(
6    origin='Chicago,IL',
7    destination='Los+Angeles,CA',
8    waypoints='Joplin,MO|Oklahoma+City,OK',
9    sensor='false'
10)
11
12resp = requests.get(url=url, params=params)
13data = resp.json() # Check the JSON Response Content documentation below
14