pub fn upload_file(
file_bytes: Vec<u8>,
client: &Client,
api_key: &str,
) -> Result<String, Error>
Expand description
Uploads a binary file to CodeDefender and returns a UUID representing the uploaded file.
§Arguments
file_bytes
- The raw contents of the binary file to upload.client
- A preconfiguredreqwest::blocking::Client
.api_key
- Your CodeDefender API key.
§Returns
A Result<String, reqwest::Error>
containing the UUID on success, or an error if the upload failed.
§Errors
Returns an error if the request fails or if the server responds with a non-success status code (not in 200..=299).