문제

Quick question: need pure python script of simple http client without using libs (only socket library possible).

Main task of this client is connect to server, receive greetings, sends get requests and read responses. Also it's good if this code will be compatible with Cython compiler.

도움이 되었습니까?

해결책

I would recommend you using requests https://github.com/kennethreitz/requests package.

But your question looks like an assignment which shall teach you how is http working on TCP communication level. In such case I would recommend you

  • learn using http protocol over telnet or netcat
  • then learn TCP communication by Python and repeat, what you already know by telnet
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top