本文整理汇总了C++中AuthRequest::GetReceivedData方法的典型用法代码示例。如果您正苦于以下问题:C++ AuthRequest::GetReceivedData方法的具体用法?C++ AuthRequest::GetReceivedData怎么用?C++ AuthRequest::GetReceivedData使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AuthRequest
的用法示例。
在下文中一共展示了AuthRequest::GetReceivedData方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AuthRequest
vector<Category*>* Session::GetCategories(string configId) {
AuthRequest* authRequest = new AuthRequest(consumerKey, consumerSecret, configId, applicationName);
QueryMethod method = GET;
string url = host + "/categories." + format;
cout << endl << "url: " << url << endl;
int status = authRequest->authWebRequest(url, method);
vector<Category*>* result = new vector<Category*>();
if (status <= 202 && "" != authRequest->GetReceivedData()) {
Stub_Categories* stub = new Stub_Categories();
if (format == "xml") {
(static_cast<XmlSerializer*>(serializer))->Deserialize(authRequest->GetReceivedData(), stub);
} else {
(static_cast<JsonSerializer*>(serializer))->Deserialize(authRequest->GetReceivedData(), stub);
}
result = stub->GetCategories();
delete stub;
}
HandleRequest(method, url, "");
HandleConfigurationResponse(status, authRequest);
delete authRequest;
return result;
}
示例2: GetCollection
CollAnalyticData* Session::GetCollection(string collectionId, string configId) {
AuthRequest* authRequest = new AuthRequest(consumerKey, consumerSecret, configId, applicationName);
QueryMethod method = GET;
string url = host + "/collection/" + collectionId + "." + format;
cout << endl << "url: " << url << endl;
int status = authRequest->authWebRequest(url, method);
CollAnalyticData* result = new CollAnalyticData();
if (status <= 202 && "" != authRequest->GetReceivedData()) {
if (format == "xml") {
(static_cast<XmlSerializer*>(serializer))->Deserialize(authRequest->GetReceivedData(), result);
} else {
(static_cast<JsonSerializer*>(serializer))->Deserialize(authRequest->GetReceivedData(), result);
}
}
HandleRequest(method, url, "");
HandleConfigurationResponse(status, authRequest);
delete authRequest;
return result;
}
示例3: VerifySubscription
Subscription* Session::VerifySubscription() {
AuthRequest* authRequest = new AuthRequest(consumerKey, consumerSecret, "", applicationName);
QueryMethod method = GET;
string url = host + "/subscription." + format;
cout << endl << "url: " << url << endl;
int status = authRequest->authWebRequest(url, method);
Subscription* result = new Subscription();
if (status <= 202 && "" != authRequest->GetReceivedData()) {
if (format == "xml") {
(static_cast<XmlSerializer*>(serializer))->Deserialize(authRequest->GetReceivedData(), result);
} else {
(static_cast<JsonSerializer*>(serializer))->Deserialize(authRequest->GetReceivedData(), result);
}
}
HandleRequest(method, url, "");
HandleConfigurationResponse(status, authRequest);
delete authRequest;
return result;
}