Skip to content

Add Option<Extractor> to extractors example #115

Open
@boustrophedon

Description

@boustrophedon

It would be nice to mention the fact that in addition to using the FromRequest::extract method, you can also use the implementation of FromRequest for Option<T: FromRequest> if you have form data that may or may not exist.

You usually don't control the data being submitted, so it's pretty much always better to use Option<web::Form> rather than just having actix return "Content type error" to the user.

Metadata

Metadata

Assignees

No one assigned

    Labels

    codeChange to code samplesgood-first-issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions