Function hyper::ffi::hyper_request_on_informational

source ·
#[no_mangle]
pub extern "C" fn hyper_request_on_informational(
    req: *mut hyper_request,
    callback: extern "C" fn(_: *mut c_void, _: *mut hyper_response),
    data: *mut c_void
) -> hyper_code
Available on crate feature ffi and hyper_unstable_ffi only.
Expand description

Set an informational (1xx) response callback.

The callback is called each time hyper receives an informational (1xx) response for this request.

The third argument is an opaque user data pointer, which is passed to the callback each time.

The callback is passed the void * data pointer, and a hyper_response * which can be inspected as any other response. The body of the response will always be empty.

NOTE: The hyper_response * is just borrowed data, and will not be valid after the callback finishes. You must copy any data you wish to persist.