Add Option<Extractor> to extractors example
boustrophedon opened this issue · 0 comments
boustrophedon commented
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.