Skip to main content
Post Made Community Wiki by Glorfindel
added 394 characters in body
Source Link
rene
  • 2.9k
  • 2
  • 18
  • 37

The C# HttpClient doesn't add a User-Agent header by default. The CDN provider (Cloudflare in this case) checks for the presence of a User-Agent header to distinguish somewhat between regular browsers and programmatic access.

Just add a User-Agent to your HttpClient and make sure it identifies you.

Identify yourself. Add something useful to the user-agent (ideally, a link to an URL, or something informational) so we can see your bot as something other than "generic unknown anonymous scraper."

See also:

The C# HttpClient doesn't add a User-Agent header by default. The CDN provider (Cloudflare in this case) checks for the presence of a User-Agent header to distinguish somewhat between regular browsers and programmatic access.

Just add a User-Agent to your HttpClient and make sure it identifies you.

Identify yourself. Add something useful to the user-agent (ideally, a link to an URL, or something informational) so we can see your bot as something other than "generic unknown anonymous scraper."

See also:

The C# HttpClient doesn't add a User-Agent header by default. The CDN provider (Cloudflare in this case) checks for the presence of a User-Agent header to distinguish somewhat between regular browsers and programmatic access.

Just add a User-Agent to your HttpClient and make sure it identifies you.

Identify yourself. Add something useful to the user-agent (ideally, a link to an URL, or something informational) so we can see your bot as something other than "generic unknown anonymous scraper."

See also:

Source Link
rene
  • 2.9k
  • 2
  • 18
  • 37

The C# HttpClient doesn't add a User-Agent header by default. The CDN provider (Cloudflare in this case) checks for the presence of a User-Agent header to distinguish somewhat between regular browsers and programmatic access.

Just add a User-Agent to your HttpClient and make sure it identifies you.

Identify yourself. Add something useful to the user-agent (ideally, a link to an URL, or something informational) so we can see your bot as something other than "generic unknown anonymous scraper."

See also: