it returns error 411 Length required. I want to make it clear first that the SocketClient class should work properly (I tested it with a GET request) and what it does is evident by the code. I've set the Content-Length as a fixed 23 (by counting data manually) to avoid complicating the problem. So what's the problem?
Thanks,
valleyman
I'm not familiar with the protocol but are you sure it should be done like this:
s.SendLine("Content-Length: 23\r\n\r\n");
and not like this:
s.SendLine("23\r\n\r\n"); ???
Perhaps the other SendLine calls also need similar modification...
Anyway, google the protocol and see the proper way to communicate with the server. It shouldn't be difficult.
Take a look at this -> http://www.jmarshall.com/easy/http/#postmethod
It first sends Content-Type and then Content-Length (you do it the other way around), I don't know if it's important but I thought I should mention it.