Function to_string_view

Synopsis

#include <lib/inc/drogon/HttpTypes.h>

string_view to_string_view(drogon::ReqResult result)

Description

No description yet.

Source

Lines 175-196 in lib/inc/drogon/HttpTypes.h.

inline string_view to_string_view(drogon::ReqResult result)
{
    switch (result)
    {
        case ReqResult::Ok:
            return "OK";
        case ReqResult::BadResponse:
            return "Bad response from server";
        case ReqResult::NetworkFailure:
            return "Network failure";
        case ReqResult::BadServerAddress:
            return "Bad server address";
        case ReqResult::Timeout:
            return "Timeout";
        case ReqResult::HandshakeError:
            return "Handshake error";
        case ReqResult::InvalidCertificate:
            return "Invalid certificate";
        default:
            return "Unknown error";
    }
}





Add Discussion as Guest

Log in