How do I Create an HTTP Request Manually in .Net?

后端 未结 5 1876
醉话见心
醉话见心 2020-12-17 01:42

I\'d like to create my own custom HTTP requests. The WebClient class is very cool, but it creates the HTTP requests automatically. I\'m thinking I need to create a network

5条回答
  •  情歌与酒
    2020-12-17 02:38

    Check out System.Net.Sockets.TcpClient if you want to write your own low level client. For HTTP GET's and POST's you can use the HttpWebRequest and HttpWebResponse classes though.

    If you are really masochistic you could go lower than TcpClient and implement your own Socket, see the Socket class.

提交回复
热议问题