![]() |
ImFusion C++ SDK 4.5.0
|
#include <ImFusionLabels/lib/include/ImFusion/Labels/Core/NetworkUtils.h>
Response of a HTTP request. More...
Response of a HTTP request.
Public Member Functions | |
| Response (Response &&other) noexcept=default | |
| Response & | operator= (Response &&other) noexcept=default |
| QJsonObject | json () const |
| If Content-Type is 'application/json', returns the body as json. | |
| std::optional< HttpError > | error () const |
| Returns an error if status is not a success value. | |
Public Attributes | |
| HttpStatus | status = HttpStatus::Unknown |
| Status code of the response. | |
| std::vector< char > | body |
| Complete body of the response without any processing done. | |
| std::string | contentType |
| Content-Type header. | |
| std::string | contentDisposition |
| Content-Disposition header. | |
Additional Inherited Members | |
| Protected Member Functions inherited from ImFusion::Utils::NotCopyable | |
| NotCopyable (NotCopyable &&) noexcept=default | |
| NotCopyable & | operator= (NotCopyable &&) noexcept=default |
| NotCopyable (const NotCopyable &)=delete | |
| NotCopyable & | operator= (const NotCopyable &)=delete |
| std::optional< HttpError > ImFusion::Network::Response::error | ( | ) | const |
Returns an error if status is not a success value.
If the body contains json, it is used in the error message.
| HttpStatus ImFusion::Network::Response::status = HttpStatus::Unknown |
Status code of the response.
Unknown means the request failed before a response was received (e.g. SSL error or some curl specific failure).