LeechCraft 0.6.70-14794-g33744ae6ce
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
10
11namespace LC::Util
12{
14 : Data_ { reply->readAll () }
15 {
16 const auto& raws = reply->rawHeaderPairs ();
17
18 Headers_.reserve (raws.size ());
19 for (const auto& pair : raws)
20 Headers_ [pair.first] << pair.second;
21 }
22
23 ReplyError::ReplyError (QNetworkReply *reply)
24 : Error_ { reply->error () }
25 , ErrorString_ { reply->errorString () }
26 , HttpStatusCode_ { reply->attribute (QNetworkRequest::HttpStatusCodeAttribute) }
27 {
28 }
29}
ReplyError(QNetworkReply *)
QHash< QByteArray, QList< QByteArray > > Headers_