Exemplo n.º 1
0
HTTPHeaderDomain GetHeaderDomain( std::string& domain){
    static std::unordered_map<std::string,HTTPHeaderDomain> domainTable={
            {"HOST",HeaderDomainType::HOST},
            {"ACCEPT",HeaderDomainType::ACCEPT},
            {"ACCEPT-CHARSET",HeaderDomainType::ACCEPT_CHARSET},
            {"ACCEPT-ENCODING",HeaderDomainType::ACCEPT_ENCODING},
            {"ACCEPT-LANGUAGE",HeaderDomainType::ACCEPT_LANGUAGE},
            {"ACCEPT-DATETIME",HeaderDomainType::ACCEPT_DATETIME},
            {"CONNECTION",HeaderDomainType::CONNECTION},
            {"COOKIE",HeaderDomainType::COOKIE},
            {"CONTENT-LENGTH",HeaderDomainType::CONTENT_LENGTH},
            {"CONTENT-TYPE",HeaderDomainType::CONTENT_TYPE},
            {"REFERER",HeaderDomainType::REFERER},
            {"USER-AGENT",HeaderDomainType::USER_AGENT}
    };
    return _GetType(domainTable,domain);
}
Exemplo n.º 2
0
Protocol GetProtocol( std::string& protocol){
    static std::unordered_map<std::string,Protocol> protocolTable={{"HTTP1_0",ProtocolType::HTTP1_0},{"HTTP1_1",ProtocolType::HTTP1_1}};
    std::string proto(protocol);
    std::replace(proto.begin(),proto.end(),'.','_');
    return _GetType(protocolTable,proto);
}
Exemplo n.º 3
0
HTTPMethod GetHTTPMethod( std::string& method){
    static std::unordered_map<std::string,HTTPMethod> methodTable={{"POST",HTTPMethodType::POST},{"GET",HTTPMethodType::GET},{"DELETE",HTTPMethodType::DELETE},{"UPDATE",HTTPMethodType::UPDATE}};
    return _GetType(methodTable,method);
}
Exemplo n.º 4
0
URLScheme GetURLScheme(std::string& scheme){
    static std::unordered_map<std::string,URLScheme> schemeTable={{"HTTP",URLSchemeType::HTTP},{"HTTPS",URLSchemeType::HTTPS},{"FTP",URLSchemeType::FTP},{"MAILTO",URLSchemeType::MAILTO}};
    return _GetType(schemeTable,scheme);
}
Exemplo n.º 5
0
SdfPrimSpecHandle
UsdSchemaBase::GetSchemaClassPrimDefinition() const
{
    return UsdSchemaRegistry::GetPrimDefinition(_GetType());
}