Function build_req

Source
pub fn build_req<P1, P2>(
    orig_req: Request,
    dst: P1,
    dst_meta: P2,
) -> Result<(Request, Option<FileHttpMetadata>), Error>
where P1: AsRef<Utf8Path>, P2: AsRef<Utf8Path>,
Expand description

Add the If-Modified-Since and/or If-None-Match headers to an HTTP request if needed.

The headers will be added if the relevant fields (Last-Modified and ETag respectively) have been returned in the last response from the server when the file has been downloaded.

ยงErrors

Propagates errors from match_meta.