Upgrading actix-web 0.4 to 0.5
Breaking0.4.10 → 0.5.8Breaking2New8Changed2Fixed16
BreakingUpgrade verdict
2 breaking changes.
In plain terms
- These builder calls no longer wrap their result in a success/error type, so code that unwraps or matches on them must change.
- Error handling for client request bodies now uses the framework's own error type rather than the underlying HTTP crate's type.
Must act 2 items need code or config changes
What you must change
Breaking2
HttpResponse builder methods .body(), .finish(), and .json() now return HttpResponse instead of Result.
HttpResponse.body()HttpResponse.finish()HttpResponse.json()ClientRequestBuilder::body() now uses actix_web::Error instead of http::Error.
ClientRequestBuilder.body()actix_web::Errorhttp::Error