Skip to content

Is there any possibility to add a custom header to the request? #315

Answered by imDarshanGK
salimguerid asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @salimguerid,

Yes, you can add a custom header to the request. Here's how you can do it in C#:

var client = new HttpClient();
client.DefaultRequestHeaders.Add("Your-Header-Name", "YourHeaderValue");

If you're using a specific library, check its documentation for the exact method of adding custom headers.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@salimguerid
Comment options

Answer selected by salimguerid
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants