I have found the answer to my question.
client.DefaultRequestHeaders.Add("X-Version","1");
That should add a custom header to your request
More Related Contents:
- How do you set the Content-Type header for an HttpClient request?
- What is the overhead of creating a new HttpClient per call in a WebAPI client?
- Getting the HTTP Referrer in ASP.NET
- ASP.NET WebApi: how to perform a multipart post with file upload using WebApi HttpClient
- Pass multiple complex objects to a post/put Web API method
- How to add cross domain support to WCF service
- Why use HttpClient for Synchronous Connection
- HttpClient retrieve all headers
- Can I specify a custom location to “search for views” in ASP.NET MVC?
- Make Https call using HttpClient
- How can I get a list of users from active directory?
- Has an event handler already been added?
- How to dynamically create ASP.net controls within dynamically created ASP.net controls
- MVC Razor view nested foreach’s model
- GridView Hide Column by code
- IdentityServer4 Role Based Authorization for Web API with ASP.NET Core Identity
- How to return JSON with ASP.NET & jQuery
- How to show a image in database in the image control of Asp.net?
- Can I have an optional parameter for an ASP.NET SOAP web service
- A potentially dangerous Request.Form value was detected from the client
- The data source does not support server-side data paging
- Prevent textbox autofill with previously entered values
- How can I secure passwords stored inside web.config?
- How to change CurrentCulture at runtime?
- How to add Web API to an existing ASP.NET MVC (5) Web Application project?
- How to return a PDF from a Web API application
- Select multiple fields group by and sum
- How to return XML in ASP.NET?
- Block requests after multiple unsuccessful logins
- iTextSharp international text