You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order to make, for example, a Signed AWS request it would be handy if the Cro::HTTP::Client could have a mechanism that a Request -> Request transform ( or transforms) can be applied after the Request has been fully assembled and before the actual http request is made, such that new headers can be computed and added based on the headers and body of the request.
On the face of it it looks like it could be inserted in .request immediately before the $pipeline.send-request is called as that will be the last place the headers could be changed.
The text was updated successfully, but these errors were encountered:
Ah no, looking more deeply in the code it would seem the best place to add this would be in build-pipelineafter the body serializers and before the request serializer is pushed. I'll have a poke.
An idea I had a long time back - but we never yet implemented - was to have middleware supported on the HTTP client, with an API like that on the server side. That would include being able to circumvent the entire request on the network and provide a response directly, so we could use it to implement all manner of things (local caching, circuit breaker, avoiding requests that would be beyond a rate limit, etc.) Then an API at construction time with before/after, again matching the HTTP server approach. I think the Cro::HTTP::Middleware interface should fit with client side as well as server side - at least, that was my hope.
In order to make, for example, a Signed AWS request it would be handy if the Cro::HTTP::Client could have a mechanism that a Request -> Request transform ( or transforms) can be applied after the Request has been fully assembled and before the actual http request is made, such that new headers can be computed and added based on the headers and body of the request.
On the face of it it looks like it could be inserted in
.request
immediately before the$pipeline.send-request
is called as that will be the last place the headers could be changed.The text was updated successfully, but these errors were encountered: