Back to Problem Solutions forum
I wonder if anyone can give me some guidance wth the interactive tasks. I am trying my best to follow the notes but always get some error or other. this is task 176 say-100
Is it my syntax or is there a problem with the server?
examples
import httplib
data = "token: 76MuCrCXzXg/0plqn3MFITE1" #token recently taken from task test data
conn = httplib.HTTPConnection("codeabbey.sourceforge.net")
conn.request("POST", "/say-100.php", data)
response = conn.getresponse()
print str(response.status) + " " + response.reason
404 Not Found
Maybe I need a leading '\' in the URL???
conn.request("POST", "\/say-100.php", data)
print str(response.status) + " " + response.reason
200
look promising,but....
print response.read()
<center><h1>400 Bad Request</h1></center>
I understood that I just need to send the token for first message and I geta number 1-99 in return
any guidance would be most welcome
Hi Andy,
The /say-100.php shouldn't be part of the POST. It should go after sourceforge.net, e.g. codeabbey.sourceforge.net/say-100.php
Unfortunately, I don't think any of the interactive tasks are currently working. Try pointing your browser at http://codeabbey.sourceforge.net/say-100.php
Ah I see. So my syntax was wrong AND the server has a problem. Not a good recipe for successful coding.
thanks for the help quandray