Hi guys,
I’ve been trying to create http requests from the editor.
Latest example in python3
import urllib.parse
import urllib.request
url = 'http://www.someserver.com/cgi-bin/register.cgi'
values = {'name' : 'Michael Foord',
'location' : 'Northampton',
'language' : 'Python' }
data = urllib.parse.urlencode(values)
data = data.encode('ascii') # data should be bytes
req = urllib.request.Request(url, data)
with urllib.request.urlopen(req) as response:
the_page = response.read()
But I have a feeling the codingame platform doesn’t support http requests…
ConnectionResetError: [Errno 104] Connection reset by peer
at socket.py. in readinto on line 375
at client.py. in _read_status on line 313
at client.py. in begin on line 351
at client.py. in getresponse on line 1172
at request.py. in do_open on line 1185
at request.py. in http_open on line 1210
at request.py. in _call_chain on line 441
at request.py. in _open on line 481
at request.py. in open on line 463
at request.py. in urlopen on line 161
at Answer.py. in <module> on line 15
Does anybody have experience in this? Doesn’t matter which programming language.