delphi - How do I ignore the response of a POST request in Indy? -


how can send post request indy (10) , ignore result(s) or lowlevel api recv? i'm asking because not need results , save bandwidth.

when using tidhttp, cannot ignore recv(), can ignore response data, @ least. call overloaded version of post() takes aresponsecontent: tstream parameter output, , set tstream nil. tidhttp still read response headers , body data socket, discard whatever reads body. important if http keep-alives used, keeps connection in sync subsequent http requests can continue being sent on same connection. if not using http keep-alives, connection closed before post() exits. if want close connection sooner, can try raising exception in tidhttp.onwork event when aworkmode wmread, may not work well, if http redirects used.

if want send post request , ignore response completely, better off using tidtcpclient instead , send own post request manually , close connection immediately.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -