Molybden API
|
A URL request job is a mechanism to provide the response data for an intercepted URL request. More...
#include <url_request_job.hpp>
Public Member Functions | |
virtual std::string | id ()=0 |
Returns the identifier of this URL request job. | |
virtual void | write (const std::vector< uint8_t > &bytes)=0 |
Appends a chunk of the response data to the URL request. | |
virtual void | write (char *bytes, uint32_t size)=0 |
Appends a chunk of the response data to the URL request. | |
virtual void | complete ()=0 |
Notifies the engine that all the response data chunks are written and the request should be completed. | |
virtual void | fail ()=0 |
Notifies the engine that an error occurred during writing the response data and the request should be failed. | |
A URL request job is a mechanism to provide the response data for an intercepted URL request.
|
pure virtual |
Appends a chunk of the response data to the URL request.
This method may be called multiple times to append several chunks. When all the chunks are written either the Complete()
or Fail()
method must be called to indicate that the request is completed or failed.
data | the response data bytes. |
size | the response data bytes size. |
|
pure virtual |
Appends a chunk of the response data to the URL request.
This method may be called multiple times to append several chunks. When all the chunks are written either the Complete()
or Fail()
method must be called to indicate that the request is completed or failed.
data | the response data bytes. |