HTTP Request

An HTTP request indicates the desired action to be performed on an identified resource. Actions include: GET, POST, HEAD, OPTIONS, PUT, DELETE, TRACE, PATCH and CONNECT.

Python Example

# Import the requests module, which may need to be installed.
import requests

# Set the endpoint.
URL = "http://maps.googleapis.com/maps/api/geocode/json"

# Create a parameters dictionary.
parameters = {'address': 'San Francisco'}

# Send the request.
result = requests.get(url = URL, params = parameters)

# Extract result data in JSON format.
data = result.json()

# Get formatted result data.
address = data['results'][0]['formatted_address']