ne_request.h | ne_request.h | |||
---|---|---|---|---|
skipping to change at line 236 | skipping to change at line 236 | |||
* <0 - error, stop reading. | * <0 - error, stop reading. | |||
* 0 - end of response | * 0 - end of response | |||
* >0 - number of bytes read into buffer. | * >0 - number of bytes read into buffer. | |||
*/ | */ | |||
ssize_t ne_read_response_block(ne_request *req, char *buffer, size_t buflen ); | ssize_t ne_read_response_block(ne_request *req, char *buffer, size_t buflen ); | |||
/**** Request hooks handling *****/ | /**** Request hooks handling *****/ | |||
typedef void (*ne_free_hooks)(void *cookie); | typedef void (*ne_free_hooks)(void *cookie); | |||
/* Hook called when a create is created. */ | /* Hook called when a create is created; passed the request method, | |||
* and the string used as the Request-URI (which may be an abs_path, | ||||
* or an absoluteURI, depending on whether an HTTP proxy is in | ||||
* use). */ | ||||
typedef void (*ne_create_request_fn)(ne_request *req, void *userdata, | typedef void (*ne_create_request_fn)(ne_request *req, void *userdata, | |||
const char *method, const char *path); | const char *method, const char *requri) ; | |||
void ne_hook_create_request(ne_session *sess, | void ne_hook_create_request(ne_session *sess, | |||
ne_create_request_fn fn, void *userdata); | ne_create_request_fn fn, void *userdata); | |||
/* Hook called before the request is sent. 'header' is the raw HTTP | /* Hook called before the request is sent. 'header' is the raw HTTP | |||
* header before the trailing CRLF is added: add in more here. */ | * header before the trailing CRLF is added: add in more here. */ | |||
typedef void (*ne_pre_send_fn)(ne_request *req, void *userdata, | typedef void (*ne_pre_send_fn)(ne_request *req, void *userdata, | |||
ne_buffer *header); | ne_buffer *header); | |||
void ne_hook_pre_send(ne_session *sess, ne_pre_send_fn fn, void *userdata); | void ne_hook_pre_send(ne_session *sess, ne_pre_send_fn fn, void *userdata); | |||
/* Hook called after the request is sent. May return: | /* Hook called after the request is sent. May return: | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 5 lines changed or added | |||