[Feature] Interceptors in Typescript client
Is your feature request related to a problem? Please describe.
I need to implement HTTP message signature in a Fern-generated typescript client, which requires me to work on headers and payload just before it's being sent to the "Fetcher".
Describe the solution you'd like
Ideally I would be able to inject an "interceptor function" (callback?) of sorts, allowing me to work on the body and headers just before the request is sent to the server.
Describe alternatives you've considered
I am current using my own "CustomFetcher". Replacing the Fern provided fetcherImpl with my own does the job, however this is code I will have to maintain moving forward...
Additional context
HTTP Message Signing simply reads selected headers (and potentially the body) to compute and append a signature in the headers. That being said I can imagine other use cases where this would be useful, such as injecting trace headers, metrics, etc.
Happy to propose a merge request if you can point me in the right direction!