Le vendredi 29 août 2014 10:35:29 UTC+2, Frank Liou a écrit :

> and body is "b'" .....is empty
> 
> i'm so confused.don't know it work or not

Hi, you should read() before you close() the connection.

conn = http.client.HTTPConnection('android.googleapis.com')
conn.request('POST', '/gcm/send', jqs, headers)
res = conn.getresponse()
body = res.read()
conn.close()
print(body)
David
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to