I
I
iVAt2020-03-04 11:25:25
C++ / C#
iVAt, 2020-03-04 11:25:25

How to use HttpClient (C#) to open certain sites?

HttpClient (C#) won't open some sites like spys.one.
An error is either 503 or 502. Everything is fine in the browser.
Tell me which way to look?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry Makarov, 2020-03-04
@iVAt

Usually 5xx errors indicate a problem on the server side. Those. you can't do anything in this case.

I
iVAt, 2020-03-04
@iVAt

In my case, it looks like it's in the title. It was necessary to set the
UserAgent header of the request, as in the official instructions it says:
" https://docs.microsoft.com/ru-ru/windows/uwp/netwo... "
questions
Thank you all for the answers, there is room to move on.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question