aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/utils/http_util/http_util.h
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2017-12-16 13:32:56 -0500
committerJack Lloyd <[email protected]>2017-12-17 14:59:21 -0500
commit9a314557b1e38c63bcf8a404ebf31248a9402015 (patch)
tree5099ba8846f9020976785f33e6233829caeb0abe /src/lib/utils/http_util/http_util.h
parentbcfd2761679d79471612bdf7f500b87123c1c6ab (diff)
Expose timeouts to the HTTP API
Diffstat (limited to 'src/lib/utils/http_util/http_util.h')
-rw-r--r--src/lib/utils/http_util/http_util.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/lib/utils/http_util/http_util.h b/src/lib/utils/http_util/http_util.h
index 14f168886..9edd3d983 100644
--- a/src/lib/utils/http_util/http_util.h
+++ b/src/lib/utils/http_util/http_util.h
@@ -14,6 +14,7 @@
#include <map>
#include <string>
#include <functional>
+#include <chrono>
namespace Botan {
@@ -79,15 +80,18 @@ BOTAN_PUBLIC_API(2,0) Response http_sync(const std::string& verb,
const std::string& url,
const std::string& content_type,
const std::vector<uint8_t>& body,
- size_t allowable_redirects);
+ size_t allowable_redirects,
+ std::chrono::milliseconds timeout = std::chrono::milliseconds(3000));
BOTAN_PUBLIC_API(2,0) Response GET_sync(const std::string& url,
- size_t allowable_redirects = 1);
+ size_t allowable_redirects = 1,
+ std::chrono::milliseconds timeout = std::chrono::milliseconds(3000));
BOTAN_PUBLIC_API(2,0) Response POST_sync(const std::string& url,
const std::string& content_type,
const std::vector<uint8_t>& body,
- size_t allowable_redirects = 1);
+ size_t allowable_redirects = 1,
+ std::chrono::milliseconds timeout = std::chrono::milliseconds(3000));
BOTAN_PUBLIC_API(2,0) std::string url_encode(const std::string& url);