I am using a service fabric Rest API and i need to add some custom headers to my requests.
I am using both a stateless implementation of the service fabric.
When receiving information in the HttpMessageRequest I have the headers there containing information.
I initiate my stateless service using the following code:
// in api controller:
proxy = Proxy.ForMicroservice<IServiceInterface>();
// in the Proxy class:
public static I Create<I>(Uri serviceAddress, UserData data) where I : class, IService
{
var returnval = ServiceProxy.Create<I>(serviceAddress,listenerName:Naming.Listener<I>());
return returnval;
}
I tried the following article (from stack overflow) but it seems to be oriented on WCF. I also expected there to be a more out of the box information about this.
How can i maintain my header information which I received in the original call, or at least transfer this information to my stateless service, without using something like an wrapper Data transfer object?