blob: 25dd1144a709533ae5631ba4f37fe306e8bcc281 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include <vbench/core/string.h>
#include <vespa/vespalib/data/memory.h>
namespace vbench {
using Memory = vespalib::Memory;
/**
* Callback interface that must be implemented in order to use the
* http client.
**/
struct HttpResultHandler
{
virtual void handleHeader(const string &name, const string &value) = 0;
virtual void handleContent(const Memory &data) = 0;
virtual void handleFailure(const string &reason) = 0;
virtual ~HttpResultHandler() {}
};
} // namespace vbench
|