LeechCraft
0.6.70-16373-g319c272718
Modular cross-platform feature rich live environment.
Loading...
Searching...
No Matches
handlenetworkreply.cpp
Go to the documentation of this file.
1
/**********************************************************************
2
* LeechCraft - modular cross-platform feature rich internet client.
3
* Copyright (C) 2006-2014 Georg Rudoy
4
*
5
* Distributed under the Boost Software License, Version 1.0.
6
* (See accompanying file LICENSE or copy at https://www.boost.org/LICENSE_1_0.txt)
7
**********************************************************************/
8
9
#include "
handlenetworkreply.h
"
10
11
namespace
LC::Util
12
{
13
ReplyWithHeaders::ReplyWithHeaders
(QNetworkReply *reply)
14
: Code_ { reply->attribute (QNetworkRequest::HttpStatusCodeAttribute).toInt () }
15
, Data_ { reply->readAll () }
16
{
17
const
auto
& raws = reply->rawHeaderPairs ();
18
19
Headers_
.reserve (raws.size ());
20
for (
const
auto
& [header, value] : raws)
21
Headers_
[header] << value;
22
}
23
24
ReplyError::ReplyError
(QNetworkReply *reply)
25
: Error_ { reply->error () }
26
, ErrorString_ { reply->errorString () }
27
, HttpStatusCode_ { reply->attribute (QNetworkRequest::HttpStatusCodeAttribute) }
28
{
29
}
30
}
handlenetworkreply.h
LC::Util
Definition
icoreproxy.h:34
LC::Util::ReplyError::ReplyError
ReplyError(QNetworkReply *)
Definition
handlenetworkreply.cpp:24
LC::Util::ReplyWithHeaders::Headers_
QHash< QByteArray, QList< QByteArray > > Headers_
Definition
handlenetworkreply.h:43
LC::Util::ReplyWithHeaders::ReplyWithHeaders
ReplyWithHeaders(QNetworkReply *)
Definition
handlenetworkreply.cpp:13
src
util
network
handlenetworkreply.cpp
Generated by
1.12.0