Struct reqwest::multipart::Form [] [src]

pub struct Form { /* fields omitted */ }

A multipart/form-data request.

Methods

impl Form
[src]

[src]

Creates a new Form without any content.

[src]

Get the boundary that this form will use.

[src]

Add a data field with supplied name and value.

Examples

let form = reqwest::multipart::Form::new()
    .text("username", "seanmonstar")
    .text("password", "secret");

[src]

Adds a file field.

The path will be used to try to guess the filename and mime.

Examples

let files = reqwest::multipart::Form::new()
    .file("key", "/path/to/file")?;

Errors

Errors when the file cannot be opened.

[src]

Adds a customized Part.

Trait Implementations

impl Debug for Form
[src]

[src]

Formats the value using the given formatter.