I'm trying to send an HTTP POST request to a server with the data file uploaded with chunked-transfer encoding. Looking at the example here, it seems like each chunk is actually its own separate XmlHTTPRequest. Is that correct?
Furthermore, I'd like to be able to use a source that is a generator function, instead of a blob or a file (as the data is being created on-the-fly in the browser). Can I modify the source like this and just pass the generator function name instead of the blob?
function* gen()
{
yield 1;
yield 2;
yield 3;
}
xhr.send(gen());