I need to rewrite the following function using only the python standard library.
def request_release_info(self):
req = requests.get('https://api.github.com/repos/user/repo/releases/latest',
auth=('user', 'token'))
content = req.json()
return content
So I need to replace Requests by Urllib/Urllib2 but I'm unable to find a way to pass my username and my token in a similar way.
Thank you for your help !