0
Modules
Would I be able to use web api on SoloLearn in python? Obviously using one of the web modules such as urlib import urllib import json try: data = { 'name' : 'mike', 'age' : 45 } request = urllib.request.Request('https://httpbin.org/get?' + urllib.parse.urlencode(data) ) # make the request URL response = urllib.request.urlopen(request) # execute the request raw_data = response.read() # read the data object_data = json.loads(raw_data) # deserilaize the data into python object print(object_data) except urllib.error.HTTPError as e: print(e)
1 Answer
+ 1
Yes it will work here try it in your code section