rfwtools.mya.get_json

rfwtools.mya.get_json(url)[source]

Simple function for making an HTTP GET request that should return a valid JSON content-type.

This method creates a custom SSLContextAdapter that has access to the system’s trusted CA certificates.

Parameters:

url (str) – The URL on which to perform the HTTP GET

Return type:

dict

Returns:

A dictionary object representing the JSON response

Raises:

ValueError – If the URL returns a non-200 status code or if the response is not valid JSON content