fixed issue #74
This commit is contained in:
@@ -40,13 +40,12 @@ class ALIBABACLOUD_CORE_EXPORT RoaServiceClient : public CoreClient {
|
||||
virtual ~RoaServiceClient();
|
||||
|
||||
protected:
|
||||
JsonOutcome makeRequest(const std::string &endpoint,
|
||||
const RoaServiceRequest &msg, HttpRequest::Method method =
|
||||
HttpRequest::Method::Get)const;
|
||||
HttpRequest buildHttpRequest(const std::string & endpoint,
|
||||
const ServiceRequest &msg, HttpRequest::Method method)const override;
|
||||
HttpRequest buildHttpRequest(const std::string & endpoint,
|
||||
const RoaServiceRequest &msg, HttpRequest::Method method)const;
|
||||
JsonOutcome makeRequest(const std::string &endpoint,
|
||||
const RoaServiceRequest &msg, HttpRequest::Method method = HttpRequest::Method::Get) const;
|
||||
HttpRequest buildHttpRequest(const std::string &endpoint,
|
||||
const ServiceRequest &msg, HttpRequest::Method method) const override;
|
||||
HttpRequest buildHttpRequest(const std::string &endpoint,
|
||||
const RoaServiceRequest &msg, HttpRequest::Method method) const;
|
||||
|
||||
private:
|
||||
std::shared_ptr<CredentialsProvider> credentialsProvider_;
|
||||
|
||||
@@ -30,6 +30,7 @@ class ALIBABACLOUD_CORE_EXPORT RoaServiceRequest : public ServiceRequest {
|
||||
using ServiceRequest::parameter;
|
||||
using ServiceRequest::setScheme;
|
||||
using ServiceRequest::setResourcePath;
|
||||
using ServiceRequest::setMethod;
|
||||
};
|
||||
} // namespace AlibabaCloud
|
||||
#endif // CORE_INCLUDE_ALIBABACLOUD_CORE_ROASERVICEREQUEST_H_
|
||||
|
||||
@@ -48,13 +48,12 @@ class ALIBABACLOUD_CORE_EXPORT RpcServiceClient : public CoreClient {
|
||||
using CoreClient::AttemptRequest;
|
||||
|
||||
protected:
|
||||
virtual JsonOutcome makeRequest(const std::string &endpoint,
|
||||
const RpcServiceRequest &msg, HttpRequest::Method method =
|
||||
HttpRequest::Method::Get) const;
|
||||
HttpRequest buildHttpRequest(const std::string & endpoint,
|
||||
const ServiceRequest &msg, HttpRequest::Method method)const override;
|
||||
HttpRequest buildHttpRequest(const std::string & endpoint,
|
||||
const RpcServiceRequest &msg, HttpRequest::Method method)const;
|
||||
virtual JsonOutcome makeRequest(const std::string &endpoint,
|
||||
const RpcServiceRequest &msg, HttpRequest::Method method = HttpRequest::Method::Get) const;
|
||||
HttpRequest buildHttpRequest(const std::string &endpoint,
|
||||
const ServiceRequest &msg, HttpRequest::Method method) const override;
|
||||
HttpRequest buildHttpRequest(const std::string &endpoint,
|
||||
const RpcServiceRequest &msg, HttpRequest::Method method) const;
|
||||
|
||||
private:
|
||||
std::shared_ptr<CredentialsProvider> credentialsProvider_;
|
||||
|
||||
@@ -28,9 +28,10 @@ class ALIBABACLOUD_CORE_EXPORT RpcServiceRequest : public ServiceRequest {
|
||||
virtual ~RpcServiceRequest();
|
||||
|
||||
std::string actionName()const;
|
||||
using ServiceRequest::setMethod;
|
||||
using ServiceRequest::setScheme;
|
||||
|
||||
protected:
|
||||
protected:
|
||||
void setActionName(const std::string &name);
|
||||
};
|
||||
} // namespace AlibabaCloud
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "Url.h"
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include "HttpRequest.h"
|
||||
|
||||
namespace AlibabaCloud {
|
||||
class ALIBABACLOUD_CORE_EXPORT ServiceRequest {
|
||||
@@ -39,10 +40,12 @@ public:
|
||||
std::string resourcePath() const;
|
||||
std::string version() const;
|
||||
std::string scheme() const;
|
||||
HttpRequest::Method method() const;
|
||||
long connectTimeout() const;
|
||||
long readTimeout() const;
|
||||
void setConnectTimeout(const long connectTimeout);
|
||||
void setReadTimeout(const long readTimeout);
|
||||
void setMethod(const HttpRequest::Method method);
|
||||
|
||||
protected:
|
||||
ServiceRequest(const std::string &product, const std::string &version);
|
||||
@@ -80,6 +83,7 @@ private:
|
||||
std::string scheme_;
|
||||
long connectTimeout_;
|
||||
long readTimeout_;
|
||||
HttpRequest::Method method_;
|
||||
};
|
||||
} // namespace AlibabaCloud
|
||||
|
||||
|
||||
Reference in New Issue
Block a user