Answer the question
In order to leave comments, you need to log in
How to make multiple requests through wininet in one connection?
Using WinInet I make requests to the server. As far as I understand, the HttpSendRequest function connects to the server, sends a request and receives a response, after which the connection is closed immediately or after a while. I need to send multiple requests on one connection. It is written in msdn that you can re-send a request with the HttpSendRequest function and it will send in the same connection, but it will send the same request, but I need different requests. WinInet allows you to change the request itself, but I did not find how to change the GET or POST request type and change the url itself. You can create a new request, but it will create a new connection, and I need it in an existing one.
Answer the question
In order to leave comments, you need to log in
Wangyu. If the server did not close the connection after serving the content, then the HINTERNET received from the HttpOpenRequest can be used to call the HttpOpenRequest again. In this case, HttpOpenRequest will return the same HINTERNET. No wonder they stuffed everything into one type.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question