Skip to content

Add reply::file(path) helper #171

Open
@ngotchac

Description

@ngotchac

Hi, I have a question on how to properly use the fs::file Filter.

I'd like to have something like this:

	let route = warp::get2()
		.and(path!("files" / String))
		.and(warp::path::end())
		.and_then(get_file_path)
		.and_then(|filepath| warp::fs::file(filepath));

Where get_file_path would be a Future returning a PathBuf.

Is there any way to achieve this?

Thanks, and great project BTW 😃

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or requestrfcExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions