LeechCraft
0.6.70-17609-g3dde4097dd
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::ReplyError::HttpStatusCode_
QVariant HttpStatusCode_
Definition
handlenetworkreply.h:53
LC::Util::ReplyError::Error_
QNetworkReply::NetworkError Error_
Definition
handlenetworkreply.h:50
LC::Util::ReplyError::ErrorString_
QString ErrorString_
Definition
handlenetworkreply.h:51
LC::Util::ReplyWithHeaders::Headers_
QHash< QByteArray, QList< QByteArray > > Headers_
Definition
handlenetworkreply.h:43
LC::Util::ReplyWithHeaders::Code_
int Code_
Definition
handlenetworkreply.h:41
LC::Util::ReplyWithHeaders::ReplyWithHeaders
ReplyWithHeaders(QNetworkReply *)
Definition
handlenetworkreply.cpp:13
LC::Util::ReplyWithHeaders::Data_
QByteArray Data_
Definition
handlenetworkreply.h:42
src
util
network
handlenetworkreply.cpp
Generated by
1.14.0