The correct way to add these headers is here

using var request = new HttpRequest
{
Uri = new Uri(“https://httpbin.org/anything”),
Method = HttpMethod.Post,
Headers = new Dictionary<string, string>
{
{ “Authorization”, “Bearer ey…” }
},

httpRequest.AddHeader(“Accept-Language”, “en”);
httpRequest.AddHeader(“Sec-Fetch-Site”, “none”);
httpRequest.AddHeader(“Sec-Fetch-Mode”, “no-cors”);
httpRequest.AddHeader(“Accept-Encoding”, “gzip, deflate, br”);
httpRequest.AddHeader(“Content-Type”, “application/x-protobuf”);

Hello @jehadfatooh100
Maybe this can help you idk try i don’ t use this :
httpRequest.DefaultRequestHeaders.Add(“HeaderName”, “Value”); //
httpRequest.DefaultRequestHeaders.Add(“HeaderName”, “Value”); //
httpRequest.DefaultRequestHeaders.Add(“HeaderName”, “Value”); //
httpRequest.DefaultRequestHeaders.Add(“HeaderName”, “Value”); //

1 Like

You just add them in the dictionary

using var request = new HttpRequest
{
  Uri = new Uri(“https://httpbin.org/anything 2”),
  Method = HttpMethod.Post,
  Headers = new Dictionary<string, string>
  {
    { "Authorization", "Bearer ey…" },
    { "Accept-Language", "en" },
    { "Sec-Fetch-Site", "none" },
    // etc...
  }
// etc...
1 Like

Thanks
Watch this please