upload

Function upload 

Source
pub fn upload<R: Read + Seek>(
    ctx: &RestContext,
    path: &str,
    method: &str,
    params: HashMap<String, Value>,
    reader: R,
    mime_type: &str,
    progress: Option<UploadProgressFn>,
) -> Result<Response>
Expand description

Upload a file to a REST API endpoint

ยงArguments

  • ctx - REST context for authentication
  • path - API endpoint path
  • method - HTTP method for initial request
  • params - Parameters for initial API request
  • reader - Reader for file content
  • mime_type - MIME type of the file
  • progress - Optional progress callback