|
DuxReiNummariae 1.1.0-alpha.19
Simple and powerful budgeting application
|
Represents a network request's reply response using Qt's QNetworkReply. This is designed to encapsulate a QNetworkReply object, which is used for handling network responses in Qt applications. More...
#include <QtRequestSender.hpp>
Public Member Functions | |
| QtReplyResponse (foundation::UniqueQtPtr<::QNetworkReply > reply, const foundation::QtPtr< QObject > &parent) | |
| Full initialisation constructor for a specified QNetworkReply and parent object. This constructor initializes the object by taking ownership of a QNetworkReply object and setting a parent for the object. It also sets up a connection to handle the 'finished' signal from QNetworkReply, calling the responseReady() slot. | |
| QVariant | attribute (const QNetworkRequest::Attribute code) const noexcept override |
| Retrieves the specified attribute from the network request. This is used to obtain various attributes associated with a network request, such as HTTP status codes, redirection targets, etc. It is essential for handling different aspects of the response beyond the raw data. | |
| QNetworkReply::NetworkError | error () const noexcept override |
| Provides the current error state of the network reply. This is used to retrieve the error status of a network operation. This information is crucial for handling any issues in network communication, allowing the application to react accordingly. | |
| QString | errorString () const noexcept override |
| Provides a human-readable description of any network error that has occurred during a request-response cycle. Useful for logging or displaying error messages to users. | |
| QByteArray | readAll () override |
| Reads and retrieves all remaining data from the reply. It extracts all data that has been buffered into the reply object from a network operation. Typical usage involves calling this method after a network request has completed to obtain the full response payload for further processing. Use this method to read the entirety of the data content in one go. | |
| QUrl | url () const noexcept override |
| Gives the URL to which the network request was made. | |
| Public Member Functions inherited from drn::networking::ReplyResponse | |
| ReplyResponse (const foundation::QtPtr< QObject > &parent) | |
| Fully initialises the object with a specified parent. | |
Additional Inherited Members | |
| Signals inherited from drn::networking::ReplyResponse | |
| void | ready () |
| Triggered when a response from a network request is ready for processing. This signal is meant to be connected to a slot or lambda function that handles the response once a network request completes. It indicates that the reply object contains data that is ready to be processed, or is in an error state. | |
Represents a network request's reply response using Qt's QNetworkReply. This is designed to encapsulate a QNetworkReply object, which is used for handling network responses in Qt applications.
| drn::networking::QtReplyResponse::QtReplyResponse | ( | foundation::UniqueQtPtr<::QNetworkReply > | reply, |
| const foundation::QtPtr< QObject > & | parent ) |
Full initialisation constructor for a specified QNetworkReply and parent object. This constructor initializes the object by taking ownership of a QNetworkReply object and setting a parent for the object. It also sets up a connection to handle the 'finished' signal from QNetworkReply, calling the responseReady() slot.
| reply | The QNetworkReply to be observed and owned by this instance. |
| parent | The parent used to manage the memory and lifecycle of this instance, and ensuring it follows the Qt object hierarchy. |
|
nodiscardoverridevirtualnoexcept |
Retrieves the specified attribute from the network request. This is used to obtain various attributes associated with a network request, such as HTTP status codes, redirection targets, etc. It is essential for handling different aspects of the response beyond the raw data.
| code | The attribute code to retrieve. |
Implements drn::networking::ReplyResponse.
|
nodiscardoverridevirtualnoexcept |
Provides the current error state of the network reply. This is used to retrieve the error status of a network operation. This information is crucial for handling any issues in network communication, allowing the application to react accordingly.
Implements drn::networking::ReplyResponse.
|
nodiscardoverridevirtualnoexcept |
Provides a human-readable description of any network error that has occurred during a request-response cycle. Useful for logging or displaying error messages to users.
Implements drn::networking::ReplyResponse.
|
nodiscardoverridevirtual |
Reads and retrieves all remaining data from the reply. It extracts all data that has been buffered into the reply object from a network operation. Typical usage involves calling this method after a network request has completed to obtain the full response payload for further processing. Use this method to read the entirety of the data content in one go.
Implements drn::networking::ReplyResponse.
|
nodiscardoverridevirtualnoexcept |
Gives the URL to which the network request was made.
Implements drn::networking::ReplyResponse.