Querying json api and http endpoint using only python endpoints

Occationally I would have a http api endpoint that I would like to access and use via a python script. However most examples online requires installing https://docs.python-requests.org/en/latest/index.html . This is certainly a good advice for more complex scripts... but for stand-alone scripts where you just want to use only builtin python features... it would fail. Below are some functions that…