Register a callback that runs before each request is sent.
The callback receives the outgoing TransportRequest and must return
the (possibly mutated) request, optionally async.
Returns a cleanup function; call it to remove the hook.
Register a callback that runs when a request fails outright — a thrown
onBeforeSend hook, a network error — instead of resolving to a
TransportResponse. Returns a cleanup function; call it to remove the hook.
Register a callback that runs after each response is received. Returns a cleanup function; call it to remove the hook.
The transport-related subset of the plugin context. Present only when the host uses the
transportprop.