Method HttpClient():beforeSend() Foundation

Notifies the application when a request is about to be sent.

METHOD :beforeSend() --> self

:beforeSend() should return the object executing the method.


The callback method :beforeSend() is called automatically by the framework to indicate to the application that a request is about to be sent while processing a HTTP request initiated using :send() or :sendAsync(). The response is available through the HttpResponse object stored in the :HttpResponse member variable.

The :beforeSend() method implemented in the HTTP client class does nothing. It is introduced here for overriding in derived classes.

The HTTP client is designed to be as scalable as possible. For this reason, callbacks execute in different threads. No assumption must be made as to which thread may be used to execute a given (or even the same) callback.


If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.