Structure containing HTTP metadata for requests.
More...
Structure containing HTTP metadata for requests.
|
| 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={}, ProgressFunction downloadProgress={}, ProgressFunction 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, ProgressFunction downloadProgress={}, ProgressFunction 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, ProgressFunction downloadProgress={}, ProgressFunction 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, ProgressFunction downloadProgress={}, ProgressFunction uploadProgress={}) |
| Construct an arbitrary HTTP request with Multipart encoded form fields as the body.
|
|
|
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={}, ProgressFunction downloadProgress={}, ProgressFunction 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={}, ProgressFunction downloadProgress={}, ProgressFunction 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, ProgressFunction downloadProgress={}, ProgressFunction 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, ProgressFunction downloadProgress={}, ProgressFunction uploadProgress={}) |
| Construct an HTTP POST request with Multipart encoded form fields as the body.
|
|
◆ Request() [1/4]
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 = {}, |
|
|
ProgressFunction | downloadProgress = {}, |
|
|
ProgressFunction | uploadProgress = {} ) |
Construct an arbitrary HTTP request with an empty body.
- Parameters
-
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 |
◆ Request() [2/4]
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, |
|
|
ProgressFunction | downloadProgress = {}, |
|
|
ProgressFunction | uploadProgress = {} ) |
Construct an arbitrary HTTP request with a binary data body.
- Parameters
-
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 |
◆ Request() [3/4]
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, |
|
|
ProgressFunction | downloadProgress = {}, |
|
|
ProgressFunction | uploadProgress = {} ) |
Construct an arbitrary HTTP request with url encoded form fields as the body.
- Parameters
-
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 |
◆ Request() [4/4]
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, |
|
|
ProgressFunction | downloadProgress = {}, |
|
|
ProgressFunction | uploadProgress = {} ) |
Construct an arbitrary HTTP request with Multipart encoded form fields as the body.
- Parameters
-
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 |
◆ Get()
Request BinaryNinja::Http::Request::Get |
( |
std::string | url, |
|
|
const std::unordered_map< std::string, std::string > & | headers = {}, |
|
|
const std::vector< std::pair< std::string, std::string > > & | params = {}, |
|
|
ProgressFunction | downloadProgress = {}, |
|
|
ProgressFunction | uploadProgress = {} ) |
|
static |
Construct an HTTP GET request.
- Parameters
-
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 |
- Returns
- Request structure with specified fields
◆ Post() [1/3]
static Request BinaryNinja::Http::Request::Post |
( |
std::string | url, |
|
|
const std::unordered_map< std::string, std::string > & | headers = {}, |
|
|
const std::vector< std::pair< std::string, std::string > > & | params = {}, |
|
|
const std::vector< uint8_t > & | body = {}, |
|
|
ProgressFunction | downloadProgress = {}, |
|
|
ProgressFunction | uploadProgress = {} ) |
|
static |
Construct an HTTP POST request with a binary data body.
- Parameters
-
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 |
- Returns
- Request structure with specified fields
◆ Post() [2/3]
static Request BinaryNinja::Http::Request::Post |
( |
std::string | url, |
|
|
const std::unordered_map< std::string, std::string > & | headers, |
|
|
const std::vector< std::pair< std::string, std::string > > & | params, |
|
|
const std::vector< std::pair< std::string, std::string > > & | formFields, |
|
|
ProgressFunction | downloadProgress = {}, |
|
|
ProgressFunction | uploadProgress = {} ) |
|
static |
Construct an HTTP POST request with url encoded form fields as the body.
- Parameters
-
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 |
- Returns
- Request structure with specified fields
◆ Post() [3/3]
static Request BinaryNinja::Http::Request::Post |
( |
std::string | url, |
|
|
const std::unordered_map< std::string, std::string > & | headers, |
|
|
const std::vector< std::pair< std::string, std::string > > & | params, |
|
|
const std::vector< MultipartField > & | formFields, |
|
|
ProgressFunction | downloadProgress = {}, |
|
|
ProgressFunction | uploadProgress = {} ) |
|
static |
Construct an HTTP POST request with Multipart encoded form fields as the body.
- Parameters
-
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 |
- Returns
- Request structure with specified fields
◆ m_method
std::string BinaryNinja::Http::Request::m_method |
◆ m_url
std::string BinaryNinja::Http::Request::m_url |
◆ m_headers
std::unordered_map< std::string , std::string > BinaryNinja::Http::Request::m_headers |
◆ m_body
std::vector<uint8_t> BinaryNinja::Http::Request::m_body |
◆ m_downloadProgress
◆ m_uploadProgress