[HTTPS] How to disable User-Agent and Accept-Encoding

0 votes
asked Sep 8, 2017 by sit_sit (120 points)
edited Nov 29, 2017 by Lukas Pokorny
GET https://www.yander.ru/ HTTP/1.1
Host: www.yander.ru
User-Agent: Rebex Web Client
Accept-Encoding: gzip, deflate
Connection: keep-alive
  1. How to disable sending User-Agent header?
  2. How to manipulate with Accept-Encoding header (disable/only gzip/only deflate)?

1 Answer

0 votes
answered Sep 8, 2017 by Lukas Matyska (40,740 points)
edited Nov 29, 2017 by Lukas Pokorny

Update: This feature has been added in version 2017 R6.1.

To disable sending User-Agent header:

request.UserAgent = null;

To manipulate Accept-Encoding header:

request.AutomaticDecompression = DecompressionMethods.None;


request.Headers[HttpRequestHeader.AcceptEncoding] = "custom-value";

The request variable can be created like this:

var creator = new HttpRequestCreator();
HttpRequest request = creator.Create("url");

or this:

HttpRequest request = (HttpRequest)WebRequest.Create("url");

Unfortunately, it is not possible to achieve this in current version.

However, it is very easy to implement it. It will be changed in the near future.

If you are interested in a beta version, please let us know.

commented Sep 9, 2017 by sit_sit (120 points)
I'm interested.
commented Nov 21, 2017 by Lukas Matyska (40,740 points)
edited Nov 29, 2017 by Lukas Pokorny
Before I managed to send you beta version, we released the requested features publicly: https://rebex.net/total-pack/history.aspx#2017R6.1