Add support for streaming transfers (#353)

This change adds onChunkCallback to the request. If defined it will be
called repeatedly with the incoming data. This allows to process data on
the go or write it to disk instead of accumulating the data in memory.
This commit is contained in:
Martin Natano
2022-02-01 06:54:32 +01:00
committed by GitHub
parent c28b569535
commit db7057de69
8 changed files with 120 additions and 17 deletions

View File

@ -7,8 +7,10 @@
#pragma once
#include <functional>
#include <string>
namespace ix
{
using OnProgressCallback = std::function<bool(int current, int total)>;
using OnChunkCallback = std::function<void(const std::string&)>;
}