mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-17 20:02:05 +00:00
25 lines
459 B
C++
25 lines
459 B
C++
#pragma once
|
|
|
|
#include <IO/BufferWithOwnMemory.h>
|
|
#include <IO/ReadBuffer.h>
|
|
|
|
namespace DB
|
|
{
|
|
|
|
/// Reads data with HTTP Chunked Transfer Encoding.
|
|
class HTTPChunkedReadBuffer : public BufferWithOwnMemory<ReadBuffer>
|
|
{
|
|
public:
|
|
explicit HTTPChunkedReadBuffer(std::unique_ptr<ReadBuffer> in_) : in(std::move(in_)) {}
|
|
|
|
private:
|
|
std::unique_ptr<ReadBuffer> in;
|
|
|
|
size_t readChunkHeader();
|
|
void readChunkFooter();
|
|
|
|
bool nextImpl() override;
|
|
};
|
|
|
|
}
|