kcurl v0.1.10
Basic C++23 wrapper over libcurl
 
Loading...
Searching...
No Matches
kcurl::http::Status Class Reference

Wrapper over a response status code. More...

#include <kcurl/http_status.hpp>

Public Types

enum struct  Code : std::int64_t { Ok = 200 }
 Response Status Code. More...
 
enum class  Category : std::int8_t {
  Informational , Successful , Redirection , ClientError ,
  ServerError , Other
}
 Category of Response status code. More...
 

Public Member Functions

 Status ()=default
 
constexpr Status (std::int64_t const code)
 
constexpr auto get_code () const -> Code
 
constexpr auto get_category () const -> Category
 
constexpr auto is_success () const -> bool
 
constexpr auto is_error () const -> bool
 
 explicit (false) const expr operator Code() const
 

Detailed Description

Wrapper over a response status code.

Member Enumeration Documentation

◆ Category

enum class kcurl::http::Status::Category : std::int8_t
strong

Category of Response status code.

Enumerator
Informational 
Successful 
Redirection 
ClientError 
ServerError 
Other 

◆ Code

enum struct kcurl::http::Status::Code : std::int64_t
strong

Response Status Code.

Enumerator
Ok 

Constructor & Destructor Documentation

◆ Status() [1/2]

kcurl::http::Status::Status ( )
default

◆ Status() [2/2]

constexpr kcurl::http::Status::Status ( std::int64_t const  code)
inlineexplicitconstexpr
Parameters
codePass an easy::Response::code here.

Member Function Documentation

◆ explicit()

kcurl::http::Status::explicit ( false  ) const
inline

◆ get_category()

constexpr auto kcurl::http::Status::get_category ( ) const -> Category
inlineconstexpr

◆ get_code()

constexpr auto kcurl::http::Status::get_code ( ) const -> Code
inlineconstexpr

◆ is_error()

constexpr auto kcurl::http::Status::is_error ( ) const -> bool
inlineconstexpr

◆ is_success()

constexpr auto kcurl::http::Status::is_success ( ) const -> bool
inlineconstexpr

The documentation for this class was generated from the following file: