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
10
11namespace LC::Util
12{
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}
ReplyError(QNetworkReply *)
QHash< QByteArray, QList< QByteArray > > Headers_