16 std::ranges::output_range<T, char> ||
17 std::ranges::output_range<T, unsigned char> ||
18 std::ranges::output_range<T, std::byte>;
21 template<ResponseBodyConcept Body>
25 template<MethodConcept Method = GetMethod, ResponseBodyConcept Body = std::
string>
37 template<
class =
void>
38 requires std::same_as<Body, string>
39 [[nodiscard]] std::expected<NJson::Json, RequestError>
AsJson()
const;
70#include <Thoth/Http/Response/Response.tpp>
Definition Response.hpp:15
auto GetInserterIterator(Body &body)
StatusCodeEnum
Definition StatusCodeEnum.hpp:7
VersionEnum
Definition Request.hpp:11
Definition ResponseHead.hpp:9
Definition Response.hpp:26
Method MethodType
Definition Response.hpp:27
bool Successful() const
Returns if the response is 2XX.
StatusCodeEnum status
Definition Response.hpp:30
string statusMessage
Definition Response.hpp:31
Body MoveBody() &&
Monad friendly move of the body, discarding the rest of the response. Recommended check for Successfu...
std::expected< NJson::Json, RequestError > AsJson() const
VersionEnum version
Definition Response.hpp:29
ResponseHeaders headers
Definition Response.hpp:32
Body body
Definition Response.hpp:33