modifyBeforeTransmit

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.

When: This will ALWAYS be called once per attempt, except when a failure occurs earlier in the request pipeline. This method may be called multiple times in the event of retries.

Modifications: The ProtocolRequestInterceptorContext.protocolRequest may have been modified by earlier modifyBeforeSigning hooks and may be modified further by later hooks. In the event of retries, the context will not include changes made in previous attempts (e.g. by request signers or other interceptors).

Error Behavior: If errors are raised by this hook, execution will jump to modifyBeforeAttemptCompletion with the raised error as the ResponseInterceptorContext.response result.