I need to intercept and sign my client requests in Armeria using AWS v4 signature. That signing procedure needs access to the body of the request, but it seems like I can't access request body in the client decorator. Something like
wcb.decorator((delegate, ctx, req) -> {
// constructAWS4SignHeader needs the body of req.
String auth = constructAWS4SignHeader(req);
HttpRequest newReq = req.withHeaders(req.headers().toBuilder().set(AUTHORIZATION, auth));
ctx.updateRequest(newReq);
return delegate.execute(ctx, req);
});
Any solution comes to mind?
in the current version which is Armeria 1.19.0, I guess we can do: