Почему HttpClient.GetAsyn c занимает в 5 раз больше времени, чем Почтальон? - PullRequest
0 голосов
/ 14 марта 2020

Согласно названию вопроса. Вот простое повторение; . Net Консольное приложение Core 3.1:

class Program
{
    static async Task Main(string[] args)
    {
        using (var client = new HttpClient())
        {
            client.BaseAddress = new Uri("https://www.bitmex.com/api/v1/");

            try
            {
                HttpResponseMessage response = await client.GetAsync("orderbook/L2?symbol=XBT&depth=0");
                // TODO: Inspect why it takes ~10s for breakpoint to go from
                // previous line to next while debugging,
                // whereas in Postman it takes ~2s.
                if (response.IsSuccessStatusCode)
...