Closed encinitasLab closed 4 years ago
You can add Authorization
header like this:
//...
// add there your OData Uri
var container = new DefaultContainer(new Uri("https://services.odata.org/V4/(S(qc322lduoxrqt13nhydbdcvx))/TripPinServiceRW/"));
container.Configurations.RequestPipeline.OnMessageCreating = (args) =>
{
var request = new HttpWebRequestMessage(args);
//Setting the values in the Authorization header
request.SetHeader("Authorization", "Bearer <your_token>");
return request;
};
//...
I see the ability to add network credentials but would be great if there was an option to add header for bearer token, or let me know if it is capable and I just missed it.