summaryrefslogtreecommitdiff
path: root/http.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'http.cpp')
-rw-r--r--http.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/http.cpp b/http.cpp
index 2b600823..4ce4206c 100644
--- a/http.cpp
+++ b/http.cpp
@@ -230,8 +230,8 @@ namespace BinaryNinja::Http
Request::Request(string method, string url, const unordered_map<string, string>& headers,
- vector<pair<string, string>> params, std::function<bool(size_t, size_t)> downloadProgress,
- std::function<bool(size_t, size_t)> uploadProgress) :
+ vector<pair<string, string>> params, ProgressFunction downloadProgress,
+ ProgressFunction uploadProgress) :
m_method(method),
m_url(url), m_headers(headers), m_downloadProgress(downloadProgress), m_uploadProgress(uploadProgress)
{
@@ -253,8 +253,8 @@ namespace BinaryNinja::Http
Request::Request(string method, string url, const unordered_map<string, string>& headers,
- vector<pair<string, string>> params, vector<uint8_t> body, std::function<bool(size_t, size_t)> downloadProgress,
- std::function<bool(size_t, size_t)> uploadProgress) :
+ vector<pair<string, string>> params, vector<uint8_t> body, ProgressFunction downloadProgress,
+ ProgressFunction uploadProgress) :
m_method(method),
m_url(url), m_headers(headers), m_body(body), m_downloadProgress(downloadProgress),
m_uploadProgress(uploadProgress)
@@ -278,7 +278,7 @@ namespace BinaryNinja::Http
Request::Request(string method, string url, const unordered_map<string, string>& headers,
vector<pair<string, string>> params, vector<pair<string, string>> formFields,
- std::function<bool(size_t, size_t)> downloadProgress, std::function<bool(size_t, size_t)> uploadProgress) :
+ ProgressFunction downloadProgress, ProgressFunction uploadProgress) :
m_method(method),
m_url(url), m_headers(headers), m_downloadProgress(downloadProgress), m_uploadProgress(uploadProgress)
{
@@ -305,7 +305,7 @@ namespace BinaryNinja::Http
Request::Request(string method, string url, const unordered_map<string, string>& headers,
vector<pair<string, string>> params, vector<MultipartField> formFields,
- std::function<bool(size_t, size_t)> downloadProgress, std::function<bool(size_t, size_t)> uploadProgress) :
+ ProgressFunction downloadProgress, ProgressFunction uploadProgress) :
m_method(method),
m_url(url), m_headers(headers), m_downloadProgress(downloadProgress), m_uploadProgress(uploadProgress)
{
@@ -332,31 +332,31 @@ namespace BinaryNinja::Http
Request Request::Get(string url, const unordered_map<string, string>& headers, const vector<pair<string, string>>& params,
- std::function<bool(size_t, size_t)> downloadProgress, std::function<bool(size_t, size_t)> uploadProgress)
+ ProgressFunction downloadProgress, ProgressFunction uploadProgress)
{
return Request("GET", url, headers, params, downloadProgress, uploadProgress);
}
Request Request::Post(string url, const unordered_map<string, string>& headers, const vector<pair<string, string>>& params,
- const vector<uint8_t>& body, std::function<bool(size_t, size_t)> downloadProgress,
- std::function<bool(size_t, size_t)> uploadProgress)
+ const vector<uint8_t>& body, ProgressFunction downloadProgress,
+ ProgressFunction uploadProgress)
{
return Request("POST", url, headers, params, body, downloadProgress, uploadProgress);
}
Request Request::Post(string url, const unordered_map<string, string>& headers, const vector<pair<string, string>>& params,
- const vector<pair<string, string>>& formFields, std::function<bool(size_t, size_t)> downloadProgress,
- std::function<bool(size_t, size_t)> uploadProgress)
+ const vector<pair<string, string>>& formFields, ProgressFunction downloadProgress,
+ ProgressFunction uploadProgress)
{
return Request("POST", url, headers, params, formFields, downloadProgress, uploadProgress);
}
Request Request::Post(string url, const unordered_map<string, string>& headers, const vector<pair<string, string>>& params,
- const vector<MultipartField>& formFields, std::function<bool(size_t, size_t)> downloadProgress,
- std::function<bool(size_t, size_t)> uploadProgress)
+ const vector<MultipartField>& formFields, ProgressFunction downloadProgress,
+ ProgressFunction uploadProgress)
{
return Request("POST", url, headers, params, formFields, downloadProgress, uploadProgress);
}