In this example, we are using the Add method to add an Authorization header to our HTTP request. We are passing in a bearer token as the value of the header. Package library: System.Net.Http Example 2: Adding a custom header to an HTTP requestc# using System.Net.Http; var httpClient = new HttpClient(); httpClient.DefaultRequestHeaders.Add("X-Custom-Header", "Hello World!"); ``` In this example, we are adding a custom header to our HTTP request. We are passing in a header name of "X-Custom-Header" and a value of "Hello World!". Package library: System.Net.Http