Function operator<<

Synopsis

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

std::ostream & operator<<(std::ostream &out, drogon::ReqResult result)

Description

No description yet.

Source

Lines 172-193 in lib/inc/drogon/HttpTypes.h.

inline std::ostream &operator<<(std::ostream &out, drogon::ReqResult result)
{
    switch (result)
    {
        case ReqResult::Ok:
            return out << "OK";
        case ReqResult::BadResponse:
            return out << "Bad response from server";
        case ReqResult::NetworkFailure:
            return out << "Network failure";
        case ReqResult::BadServerAddress:
            return out << "Bad server address";
        case ReqResult::Timeout:
            return out << "Timeout";
        case ReqResult::HandshakeError:
            return out << "Handshake error";
        case ReqResult::InvalidCertificate:
            return out << "Invalid certificate";
        default:
            return out << "Unknown error";
    }
}





Add Discussion as Guest

Log in