N
N
Nikolay372019-01-24 01:08:04
JavaScript
Nikolay37, 2019-01-24 01:08:04

How to send multiple proxy requests in C#?

I need to asynchronously send 50 requests from several proxy servers, then give a delay and after 5 seconds again the same. From each request, you need to process the received data.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
RubaXa, 2016-05-26
@deadkEEper1

Are you sure you need an array of objects?

arr.reduce((results, poll) => {
   const name = poll.name.split(' ')[0];
   if (!results[name]) {
      const tmp = {[name]: []};
      results.push(tmp);
      results[name] = tmp[name];
   }
   results[name].push(poll.answers_count);
   return results;
}, []);

What's wrong with a flat object?
arr.reduce((results, poll) => {
   const name = poll.name.split(' ')[0];

   !results[name] && (results[name] = []);
   results[name].push(poll.answers_count);

   return results;
}, {});

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question