Macro anterofit::path [] [src]

macro_rules! path {
    ($path:expr) => { ... };
}

A field value that resolves to a path on the filesystem.

The value can be anything that implements Into<PathBuf>, such as &Path or &str.

This will make the request into a multipart/form-data request and upload the file that this path points to.

The filename and Content-Type header to be supplied with the field will be inferred from the file name and extension, respectively.

To supply these values yourself, and/or your own opened file handle, see the stream!() macro.