Detailed DescriptionThis structure describes the callbacks to be called by the HTTP request. Field Documentation
This callback is called when the HTTP request is completed. If the callback on_data_read() is specified, the variable response->data will be set to NULL, otherwise it will contain the complete data. Response data is allocated from pj_http_req's internal memory pool so the data remain valid as long as pj_http_req is not destroyed and application does not start a new request. If no longer required, application may choose to destroy pj_http_req immediately by calling pj_http_req_destroy() inside the callback.
This callback is called when a segment of response body data arrives. If this callback is specified (i.e. not NULL), the on_complete() callback will be called with zero-length data (within the response parameter), hence the application must store and manage its own data buffer, otherwise the on_complete() callback will be called with the response parameter containing the complete data.
This callback is called when a complete HTTP response header is received.
This callback is called when the HTTP request is ready to send its request body. Application may wish to use this callback if it wishes to load the data at a later time or if it does not wish to load the whole data into memory. In order for this callback to be called, application MUST set http_req_param.total_size to a value greater than 0.
The documentation for this struct was generated from the following file:
Copyright (C) 2006-2009 Teluu Inc. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||