On Monday, 9 November 2020 at 19:55:07 UTC, Vino wrote:
...

The only curl option you need to set within the loop is the CurlOption.url. So your foreach block should look more like:

foreach (...) {
string url = chain(apihost, only(':'), to!string(apiport), apiuri).to!string;
    https.handle.set(CurlOption.url, url);
    https.perform();
    scope(failure) exit(-4);
    scope(exit) https.shutdown;
    apidata.insert(tuple(seq, cast(string) content));
    content = [];
}

Every other line can be placed before the foreach.

Reply via email to