add POST support and fix user specified scheme via commonrequest

This commit is contained in:
zhangzifa
2019-01-31 15:48:30 +08:00
committed by Jackson Tian
parent b429dcc915
commit 138dbdc61e
23 changed files with 215 additions and 49 deletions

View File

@@ -50,6 +50,7 @@ namespace AlibabaCloud
using ServiceRequest::setResourcePath;
void setRequestPattern(RequestPattern pattern);
using ServiceRequest::setVersion;
using ServiceRequest::setScheme;
RequestPattern requestPattern()const;
protected:
using ServiceRequest::product;

View File

@@ -1,12 +1,12 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -26,7 +26,7 @@ namespace AlibabaCloud
public:
HmacSha1Signer();
~HmacSha1Signer();
virtual std::string generate(const std::string &src, const std::string &secret)const override;
};
}

View File

@@ -1,12 +1,12 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -28,6 +28,8 @@ namespace AlibabaCloud
virtual ~RoaServiceRequest();
using ServiceRequest::setParameter;
using ServiceRequest::setContent;
using ServiceRequest::parameter;
using ServiceRequest::setScheme;
};
}
#endif // !ALIBABACLOUD_CORE_ROASERVICEREQUEST_H_

View File

@@ -1,12 +1,12 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -28,6 +28,7 @@ namespace AlibabaCloud
virtual ~RpcServiceRequest();
std::string actionName()const;
using ServiceRequest::setScheme;
protected:
void setActionName(const std::string &name);

View File

@@ -1,12 +1,12 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -39,6 +39,7 @@ namespace AlibabaCloud
std::string product()const;
std::string resourcePath()const;
std::string version()const;
std::string scheme()const;
protected:
ServiceRequest(const std::string &product, const std::string &version);
ServiceRequest(const ServiceRequest &other);
@@ -55,6 +56,7 @@ namespace AlibabaCloud
void setResourcePath(const std::string &path);
void setProduct(const std::string &product);
void setVersion(const std::string &version);
void setScheme(const std::string scheme);
private:
char *content_;
size_t contentSize_;
@@ -62,6 +64,7 @@ namespace AlibabaCloud
std::string product_;
std::string resourcePath_;
std::string version_;
std::string scheme_;
};
}

View File

@@ -1,12 +1,12 @@
/*
* Copyright 2009-2017 Alibaba Cloud All rights reserved.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.