-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathHttpResponseParser
More file actions
40 lines (32 loc) · 883 Bytes
/
HttpResponseParser
File metadata and controls
40 lines (32 loc) · 883 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
* Copyright (C) 2021 Frank Mertens.
*
* Distribution and use is allowed under the terms of the GNU General Public License version 3
* (see CoreComponents/LICENSE-gpl-3.0).
*
*/
#pragma once
#include <cc/HttpMessageParser>
#include <cc/HttpResponse>
namespace cc {
/** \class HttpResponseParser cc/HttpResponseParser
* \ingroup http_protocol
* \brief HTTP client-side message parser
*/
class HttpResponseParser final: public HttpMessageParser
{
public:
/** Create a null HTTP response message parser
*/
HttpResponseParser() = default;
/** Create a new HTTP response message parser
* \param stream %Stream to read responses from
*/
explicit HttpResponseParser(const Stream &stream);
/** Read the next HTTP response send by the server
*/
HttpResponse readResponse();
private:
struct State;
};
} // namespace cc