Method Protocols.HTTP.Session()->Request()->set_callbacks()
- Method
set_callbacks
voidset_callbacks(function(mixed... :mixed)|zeroheaders,function(mixed... :mixed)|zerodata,function(mixed... :mixed)|zerofail,mixed...callback_arguments)- Description
Setup callbacks for async mode,
headerswill be called when the request got connected, and got data headers;datawill be called when the request got the amount of data it's supposed to get andfailis called whenever the request failed.Note here that an error message from the server isn't considered a failure, only a failed TCP connection.