Simple Odata Client - How to add oAuth Token in each request header?
问题 In Microsoft oData v4 proxy client, there is an option to add auth token into each request. It can be achieved by following way: var container = new Default.Container(new Uri(http://localhost:9000/)); //Registering the handle to the BuildingRequest event. container.BuildingRequest += (sender, e) => OnBuildingRequest(sender, e, accessToken); //Every time a OData request is build it adds an Authorization Header with the acesstoken private static void OnBuildingRequest(object sender,