github actix/actix-web web-v4.0.0-beta.2
actix-web: v4.0.0-beta.2

latest releases: web-v4.5.1, actors-v4.3.0, test-v0.1.3...
pre-release3 years ago

Added

  • The method Either<web::Json<T>, web::Form<T>>::into_inner() which returns the inner type for
    whichever variant was created. Also works for Either<web::Form<T>, web::Json<T>>. #1894
  • Add services! macro for helping register multiple services to App. #1933
  • Enable registering a vec of services of the same type to App #1933

Changed

  • Rework Responder trait to be sync and returns Response/HttpResponse directly.
    Making it simpler and more performant. #1891
  • ServiceRequest::into_parts and ServiceRequest::from_parts can no longer fail. #1893
  • ServiceRequest::from_request can no longer fail. #1893
  • Our Either type now uses Left/Right variants (instead of A/B) #1894
  • test::{call_service, read_response, read_response_json, send_request} take &Service
    in argument #1905
  • App::wrap_fn, Resource::wrap_fn and Scope::wrap_fn provide &Service in closure
    argument. #1905
  • web::block no longer requires the output is a Result. #1957

Fixed

  • Multiple calls to App::data with the same type now keeps the latest call's data. #1906

Removed

  • Public field of web::Path has been made private. #1894
  • Public field of web::Query has been made private. #1894
  • TestRequest::with_header; use TestRequest::default().insert_header(). #1869
  • AppService::set_service_data; for custom HTTP service factories adding application data, use the
    layered data model by calling ServiceRequest::add_data_container when handling
    requests instead. #1906

Don't miss a new actix-web release

NewReleases is sending notifications on new releases.