Added StringToContentType.
This commit is contained in:
@@ -86,6 +86,20 @@ namespace Apostol {
|
|||||||
}
|
}
|
||||||
//--------------------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
CHTTPRequest::CContentType CCustomModule::StringToContentType(const CString &ContentType) {
|
||||||
|
if (ContentType == "application/json") {
|
||||||
|
return CHTTPRequest::json;
|
||||||
|
} else if (ContentType == "text/html") {
|
||||||
|
return CHTTPRequest::html;
|
||||||
|
} else if (ContentType == "application/xml") {
|
||||||
|
return CHTTPRequest::xml;
|
||||||
|
} else if (ContentType == "application/octet-stream") {
|
||||||
|
return CHTTPRequest::sbin;
|
||||||
|
}
|
||||||
|
return CHTTPRequest::text;
|
||||||
|
}
|
||||||
|
//--------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
CString CCustomModule::ToString(unsigned long Value) {
|
CString CCustomModule::ToString(unsigned long Value) {
|
||||||
TCHAR szString[_INT_T_LEN + 1] = {0};
|
TCHAR szString[_INT_T_LEN + 1] = {0};
|
||||||
sprintf(szString, "%lu", Value);
|
sprintf(szString, "%lu", Value);
|
||||||
|
|||||||
@@ -143,6 +143,7 @@ namespace Apostol {
|
|||||||
static void UpdateOAuth2(CContext &Context, const CJSONObject &OAuth2);
|
static void UpdateOAuth2(CContext &Context, const CJSONObject &OAuth2);
|
||||||
static void UpdateProviders(CProviders &Providers, const CJSONObject &Data);
|
static void UpdateProviders(CProviders &Providers, const CJSONObject &Data);
|
||||||
|
|
||||||
|
static CHTTPRequest::CContentType StringToContentType(const CString &ContentType);
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user