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); }
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); }
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); }
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); }
SdfPrimSpecHandle UsdSchemaBase::GetSchemaClassPrimDefinition() const { return UsdSchemaRegistry::GetPrimDefinition(_GetType()); }