Structure containing HTTP metadata for requests. More...
Structure containing HTTP metadata for requests.
Public Member Functions | |
Request (std::string method, std::string url, const std::unordered_map< std::string, std::string > &headers={}, std::vector< std::pair< std::string, std::string > > params={}, std::function< bool(size_t, size_t)> downloadProgress={}, std::function< bool(size_t, size_t)> uploadProgress={}) | |
Construct an arbitrary HTTP request with an empty body. | |
Request (std::string method, std::string url, const std::unordered_map< std::string, std::string > &headers, std::vector< std::pair< std::string, std::string > > params, std::vector< uint8_t > body, std::function< bool(size_t, size_t)> downloadProgress={}, std::function< bool(size_t, size_t)> uploadProgress={}) | |
Construct an arbitrary HTTP request with a binary data body. | |
Request (std::string method, std::string url, const std::unordered_map< std::string, std::string > &headers, std::vector< std::pair< std::string, std::string > > params, std::vector< std::pair< std::string, std::string > > formFields, std::function< bool(size_t, size_t)> downloadProgress={}, std::function< bool(size_t, size_t)> uploadProgress={}) | |
Construct an arbitrary HTTP request with url encoded form fields as the body. | |
Request (std::string method, std::string url, const std::unordered_map< std::string, std::string > &headers, std::vector< std::pair< std::string, std::string > > params, std::vector< MultipartField > formFields, std::function< bool(size_t, size_t)> downloadProgress={}, std::function< bool(size_t, size_t)> uploadProgress={}) | |
Construct an arbitrary HTTP request with Multipart encoded form fields as the body. | |
Static Public Member Functions | |
static Request | Get (std::string url, const std::unordered_map< std::string, std::string > &headers={}, const std::vector< std::pair< std::string, std::string > > ¶ms={}, std::function< bool(size_t, size_t)> downloadProgress={}, std::function< bool(size_t, size_t)> uploadProgress={}) |
Construct an HTTP GET request. | |
static Request | Post (std::string url, const std::unordered_map< std::string, std::string > &headers={}, const std::vector< std::pair< std::string, std::string > > ¶ms={}, const std::vector< uint8_t > &body={}, std::function< bool(size_t, size_t)> downloadProgress={}, std::function< bool(size_t, size_t)> uploadProgress={}) |
Construct an HTTP POST request with a binary data body. | |
static Request | Post (std::string url, const std::unordered_map< std::string, std::string > &headers, const std::vector< std::pair< std::string, std::string > > ¶ms, const std::vector< std::pair< std::string, std::string > > &formFields, std::function< bool(size_t, size_t)> downloadProgress={}, std::function< bool(size_t, size_t)> uploadProgress={}) |
Construct an HTTP POST request with url encoded form fields as the body. | |
static Request | Post (std::string url, const std::unordered_map< std::string, std::string > &headers, const std::vector< std::pair< std::string, std::string > > ¶ms, const std::vector< MultipartField > &formFields, std::function< bool(size_t, size_t)> downloadProgress={}, std::function< bool(size_t, size_t)> uploadProgress={}) |
Construct an HTTP POST request with Multipart encoded form fields as the body. | |
Public Attributes | |
std::string | m_method |
std::string | m_url |
std::unordered_map< std::string, std::string > | m_headers |
std::vector< uint8_t > | m_body |
std::function< bool(size_t, size_t)> | m_downloadProgress |
std::function< bool(size_t, size_t)> | m_uploadProgress |
BinaryNinja::Http::Request::Request | ( | std::string | method, |
std::string | url, | ||
const std::unordered_map< std::string, std::string > & | headers = {}, | ||
std::vector< std::pair< std::string, std::string > > | params = {}, | ||
std::function< bool(size_t, size_t)> | downloadProgress = {}, | ||
std::function< bool(size_t, size_t)> | uploadProgress = {} ) |
Construct an arbitrary HTTP request with an empty body.
method | Request method eg GET |
url | Target URL eg https://binary.ninja |
headers | Header keys/values |
params | Query parameters, keys/values |
downloadProgress | Function to call for download progress updates |
uploadProgress | Function to call for upload progress updates |
BinaryNinja::Http::Request::Request | ( | std::string | method, |
std::string | url, | ||
const std::unordered_map< std::string, std::string > & | headers, | ||
std::vector< std::pair< std::string, std::string > > | params, | ||
std::vector< uint8_t > | body, | ||
std::function< bool(size_t, size_t)> | downloadProgress = {}, | ||
std::function< bool(size_t, size_t)> | uploadProgress = {} ) |
Construct an arbitrary HTTP request with a binary data body.
method | Request method eg GET |
url | Target URL eg https://binary.ninja |
headers | Header keys/values |
params | Query parameters, keys/values |
body | Content body (binary data) |
downloadProgress | Function to call for download progress updates |
uploadProgress | Function to call for upload progress updates |
BinaryNinja::Http::Request::Request | ( | std::string | method, |
std::string | url, | ||
const std::unordered_map< std::string, std::string > & | headers, | ||
std::vector< std::pair< std::string, std::string > > | params, | ||
std::vector< std::pair< std::string, std::string > > | formFields, | ||
std::function< bool(size_t, size_t)> | downloadProgress = {}, | ||
std::function< bool(size_t, size_t)> | uploadProgress = {} ) |
Construct an arbitrary HTTP request with url encoded form fields as the body.
method | Request method eg GET |
url | Target URL eg https://binary.ninja |
headers | Header keys/values |
params | Query parameters, keys/values |
formFields | HTTP form fields, keys/values (both must be strings) |
downloadProgress | Function to call for download progress updates |
uploadProgress | Function to call for upload progress updates |
BinaryNinja::Http::Request::Request | ( | std::string | method, |
std::string | url, | ||
const std::unordered_map< std::string, std::string > & | headers, | ||
std::vector< std::pair< std::string, std::string > > | params, | ||
std::vector< MultipartField > | formFields, | ||
std::function< bool(size_t, size_t)> | downloadProgress = {}, | ||
std::function< bool(size_t, size_t)> | uploadProgress = {} ) |
Construct an arbitrary HTTP request with Multipart encoded form fields as the body.
method | Request method eg GET |
url | Target URL eg https://binary.ninja |
headers | Header keys/values |
params | Query parameters, keys/values |
formFields | HTTP form fields, keys/values (values can be arbitrary data) |
downloadProgress | Function to call for download progress updates |
uploadProgress | Function to call for upload progress updates |
|
static |
Construct an HTTP GET request.
url | Target URL eg https://binary.ninja |
headers | Header keys/values |
params | Query parameters, keys/values |
downloadProgress | Function to call for download progress updates |
uploadProgress | Function to call for upload progress updates |
|
static |
Construct an HTTP POST request with a binary data body.
url | Target URL eg https://binary.ninja |
headers | Header keys/values |
params | Query parameters, keys/values |
body | Request body data |
downloadProgress | Function to call for download progress updates |
uploadProgress | Function to call for upload progress updates |
|
static |
Construct an HTTP POST request with url encoded form fields as the body.
url | Target URL eg https://binary.ninja |
headers | Header keys/values |
params | Query parameters, keys/values |
formFields | HTTP form fields, keys/values (both must be strings) |
downloadProgress | Function to call for download progress updates |
uploadProgress | Function to call for upload progress updates |
|
static |
Construct an HTTP POST request with Multipart encoded form fields as the body.
url | Target URL eg https://binary.ninja |
headers | Header keys/values |
params | Query parameters, keys/values |
formFields | HTTP form fields, keys/values (values can be arbitrary data) |
downloadProgress | Function to call for download progress updates |
uploadProgress | Function to call for upload progress updates |
std::string BinaryNinja::Http::Request::m_method |
std::string BinaryNinja::Http::Request::m_url |
std::unordered_map< std::string , std::string > BinaryNinja::Http::Request::m_headers |
std::vector<uint8_t> BinaryNinja::Http::Request::m_body |
std::function<bool(size_t, size_t)> BinaryNinja::Http::Request::m_downloadProgress |
std::function<bool(size_t, size_t)> BinaryNinja::Http::Request::m_uploadProgress |