summaryrefslogtreecommitdiff
path: root/include/llmr/platform/platform.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/llmr/platform/platform.hpp')
-rw-r--r--include/llmr/platform/platform.hpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/llmr/platform/platform.hpp b/include/llmr/platform/platform.hpp
index 972e7db6ba..d516378c2a 100644
--- a/include/llmr/platform/platform.hpp
+++ b/include/llmr/platform/platform.hpp
@@ -25,9 +25,11 @@ struct Response {
// Makes an HTTP request of a URL, preferrably on a background thread, and calls a function with the
// results in the original thread (which runs the libuv loop).
+// If the loop pointer is NULL, the callback function will be called on an arbitrary thread.
// Returns a cancellable request.
std::shared_ptr<Request> request_http(const std::string &url,
- std::function<void(Response *)> callback, uv_loop_t *loop);
+ std::function<void(Response *)> callback,
+ uv_loop_t *loop = nullptr);
// Cancels an HTTP request.
void cancel_request_http(const std::shared_ptr<Request> &req);