예제 #1
0
const Buffer * HttpRequest::getPostParamBuffer(const std::wstring &name) const
{
	shared_ptr<HttpPostParam> param = getPostParam(name);
	if(param == nullptr)
		return nullptr;

	return param->getBuffer();
}
예제 #2
0
std::wstring HttpRequest::getPostParamString(const std::wstring &name, const std::wstring &def) const
{
	shared_ptr<HttpPostParam> param = getPostParam(name);
	if(param == nullptr)
		return def;

	return param->getString();
}
예제 #3
0
    void object::test<2>()
    {
        const std::wstring getUrl = L"http://www.excite.co.jp/world/english/?auto_detect=on&before={}";
        PostParam postParam = getPostParam(getUrl);

        ensure_equals(M(__LINE__), postParam.actionUrl, L"http://www.excite.co.jp/world/english/");
        ensure_equals(M(__LINE__), postParam.params[L"nothing"], L"");
        ensure_equals(M(__LINE__), postParam.params[L"auto_detect"], L"on");
        ensure_equals(M(__LINE__), postParam.params[L"before"], L"{}");
    }