class
#include <IO/WebRequest.h>
WebResponse Describes the server response of the web request.
Constructors, destructors, conversion operators
- WebResponse()
- WebResponse(const WebResponse& other)
- ~WebResponse()
- operator bool() const explicit noexcept
- Whether the object is valid.
Public functions
- auto operator=(const WebResponse& other) -> WebResponse&
- auto IsValid() const -> bool noexcept
- Returns
true
if the object is valid. -
auto GetContentLength() const -> std::
int64_t - Returns the content length of the response data.
-
auto GetURL() const -> Containers::
String - Returns the effective URL of the request.
-
auto GetHeader(Containers::
StringView name) const -> Containers:: String - Returns value of the specified header.
-
auto GetAllHeaderValues(Containers::
StringView name) const -> Containers:: Array<Containers:: String> - Returns all values of the specified header.
-
auto GetMimeType() const -> Containers::
String - Returns the MIME type of the response.
-
auto GetContentType() const -> Containers::
String - Returns the value of the "Content-Type" header.
-
auto GetStatus() const -> std::
int32_t - Returns the status code returned by the server.
-
auto GetStatusText() const -> Containers::
String - Returns the status text returned by the server.
- auto GetStream() const -> Stream*
- Returns a stream which represents the response data sent by the server.
-
auto GetSuggestedFileName() const -> Containers::
String - Returns a suggested filename for the response data.
-
auto AsString() const -> Containers::
String - Returns all response data as a string.
-
auto GetDataFile() const -> Containers::
String - Returns the full path of the file to which data is being saved when the storage is Storage::
File.