C# Custom Message handler not giving headers values in web api
up vote
3
down vote
favorite
I have implemented MessageHandlers:
config.MessageHandlers.Add(new TokenValidationHandler());
And When I Check on request to get Custom Header in request.I am getting Name of the Header Not a value Can someone help:
Please check ScreenShot.
And the same thing which I want is done using postman but when the origin is different is not happening.
How Cors Are enable:
var cors = new EnableCorsAttribute("*", "*", "*");
config.EnableCors(cors);
What i need is when i am passing custom header From different origin:
'hitesh':'Token'
I need this in Custom Header But i am getting 'hitesh' in Access Control Access Request Headers.
Note: Cors are Enable:
protected async override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
{
}
c# http-headers
add a comment |
up vote
3
down vote
favorite
I have implemented MessageHandlers:
config.MessageHandlers.Add(new TokenValidationHandler());
And When I Check on request to get Custom Header in request.I am getting Name of the Header Not a value Can someone help:
Please check ScreenShot.
And the same thing which I want is done using postman but when the origin is different is not happening.
How Cors Are enable:
var cors = new EnableCorsAttribute("*", "*", "*");
config.EnableCors(cors);
What i need is when i am passing custom header From different origin:
'hitesh':'Token'
I need this in Custom Header But i am getting 'hitesh' in Access Control Access Request Headers.
Note: Cors are Enable:
protected async override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
{
}
c# http-headers
add a comment |
up vote
3
down vote
favorite
up vote
3
down vote
favorite
I have implemented MessageHandlers:
config.MessageHandlers.Add(new TokenValidationHandler());
And When I Check on request to get Custom Header in request.I am getting Name of the Header Not a value Can someone help:
Please check ScreenShot.
And the same thing which I want is done using postman but when the origin is different is not happening.
How Cors Are enable:
var cors = new EnableCorsAttribute("*", "*", "*");
config.EnableCors(cors);
What i need is when i am passing custom header From different origin:
'hitesh':'Token'
I need this in Custom Header But i am getting 'hitesh' in Access Control Access Request Headers.
Note: Cors are Enable:
protected async override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
{
}
c# http-headers
I have implemented MessageHandlers:
config.MessageHandlers.Add(new TokenValidationHandler());
And When I Check on request to get Custom Header in request.I am getting Name of the Header Not a value Can someone help:
Please check ScreenShot.
And the same thing which I want is done using postman but when the origin is different is not happening.
How Cors Are enable:
var cors = new EnableCorsAttribute("*", "*", "*");
config.EnableCors(cors);
What i need is when i am passing custom header From different origin:
'hitesh':'Token'
I need this in Custom Header But i am getting 'hitesh' in Access Control Access Request Headers.
Note: Cors are Enable:
protected async override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
{
}
c# http-headers
c# http-headers
edited Nov 21 at 19:32
asked Nov 18 at 16:41
D-john Anshani
847112
847112
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53363185%2fc-sharp-custom-message-handler-not-giving-headers-values-in-web-api%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown