Interceptor
An interceptor allows injecting code into the request execution pipeline of a generated SDK client.
Terminology:
execution
- one end-to-end invocation against an SDK clientattempt
- a single attempt at performing an execution, executions may be retired multiple times based on the client's retry strategy.hook
- a single method on the interceptor allowing injection of code into a specific part of the execution pipeline. Hooks are either "read-only" hooks, which make it possible to read in-flight request or response messages, orread/write
hooks, which make it possible to modify in-flight request or response messages. Read only hooks MUST not modify state even if it is possible to do so (it is not always possible or performant to provide an immutable view of every type).
Functions
A hook called when an attempt is completed. This method has the ability to modify and return a new operation output or error.
A hook called when an attempt is completed. This method has the ability to modify and return a new operation output or error.
A hook called before the transport request message is deserialized into the output response type. This method has the ability to modify and return a new transport response.
A hook called before the retry loop is entered. This method has the ability to modify and return a new transport request.
A hook called before the input message is marshalled into a (protocol) transport message. This method has the ability to modify and return a new operation request.
A hook called before the transport request message is signed. This method has the ability to modify and return a new transport request.
A hook called before the transport request message is sent to the service. This method has the ability to modify and return a new transport request.
A hook called when an attempt is completed.
A hook called after the transport request message is deserialized into the output response type.
A hook called when an attempt is completed.
A hook called after the input message is marshalled into a (protocol) transport message.
A hook called after the transport request message is signed.
A hook called after the transport response message is received from the service.
A hook called before each attempt at sending the protocol request message to the service.
A hook called before the transport request message is deserialized into the output response type.
A hook called at the start of an execution, before the SDK does anything else.
A hook called before the input message is marshalled into a (protocol) transport message.
A hook called before the transport request message is signed.
A hook called before the transport request message is sent to the service.