Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Allow to set additional Http headers directly on the IClientExecutable #1152
I'd like to propose an extension to the IClientExecutable interface that allows to set arbitrary HTTP headers. This is an alternative to using AdditionalRequestHeadersInterceptor, with one important difference: it makes the client stateless so it can even be reused with header values like OAuth2 tokens that change with every request.
It's too static - the interceptor has predefined header/value pairs. interceptRequest(IHttpRequest theRequest) allows no further client-side context (like information of the user for whom the request is executed).