Add ccapi [header-only] lib to includes
This is the open source crypto connector lib
This commit is contained in:
1 parent
27310d2829
commit
99c440f568
102 files changed
+33735
No files matched your search
@@ -0,0 +1,23 @@
|
||||
#ifndef INCLUDE_CCAPI_CPP_CCAPI_HTTP_RETRY_H_
|
||||
#define INCLUDE_CCAPI_CPP_CCAPI_HTTP_RETRY_H_
|
||||
#include <string>
|
||||
namespace ccapi {
|
||||
class HttpRetry CCAPI_FINAL {
|
||||
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))
|
||||
: 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() + "]";
|
||||
return output;
|
||||
}
|
||||
int numRetry;
|
||||
int numRedirect;
|
||||
std::shared_ptr<std::promise<void> > promisePtr;
|
||||
};
|
||||
|
||||
} /* namespace ccapi */
|
||||
#endif // INCLUDE_CCAPI_CPP_CCAPI_HTTP_RETRY_H_
|
||||
Reference in new issue
Block a user