Update ccapi to 7.9.3 (compatible w/ new boost)
This commit is contained in:
1 parent
bd7ccb5f44
commit
9fa7a9898e
117 files changed
+9016
-11255
No files matched your search
@@ -2,25 +2,29 @@
|
||||
#define INCLUDE_CCAPI_CPP_CCAPI_HTTP_RETRY_H_
|
||||
#include <future>
|
||||
#include <string>
|
||||
|
||||
namespace ccapi {
|
||||
|
||||
/**
|
||||
* This class is used for retrying http requests for the REST API.
|
||||
*/
|
||||
class HttpRetry CCAPI_FINAL {
|
||||
class HttpRetry {
|
||||
public:
|
||||
explicit HttpRetry(int numRetry = 0, int numRedirect = 0, std::string redirectUrlStr = "",
|
||||
std::shared_ptr<std::promise<void> > promisePtr = std::shared_ptr<std::promise<void> >(nullptr))
|
||||
std::shared_ptr<std::promise<void>> promisePtr = std::shared_ptr<std::promise<void>>(nullptr))
|
||||
: numRetry(numRetry), numRedirect(numRedirect), promisePtr(promisePtr) {}
|
||||
|
||||
std::string toString() const {
|
||||
std::ostringstream oss;
|
||||
oss << promisePtr;
|
||||
std::string output =
|
||||
"HttpConnection [numRetry = " + ccapi::toString(numRetry) + ", numRedirect = " + ccapi::toString(numRedirect) + ", promisePtr = " + oss.str() + "]";
|
||||
"HttpRetry [numRetry = " + ccapi::toString(numRetry) + ", numRedirect = " + ccapi::toString(numRedirect) + ", promisePtr = " + oss.str() + "]";
|
||||
return output;
|
||||
}
|
||||
|
||||
int numRetry;
|
||||
int numRedirect;
|
||||
std::shared_ptr<std::promise<void> > promisePtr;
|
||||
std::shared_ptr<std::promise<void>> promisePtr;
|
||||
};
|
||||
|
||||
} /* namespace ccapi */
|
||||
|
||||
Reference in new issue
Block a user