2 KiB
Migration from 0.5 to 0.6
-
ws::Message::Close
now includes optional close reason.ws::CloseCode::Status
andws::CloseCode::Empty
have been removed. -
HttpServer::threads()
renamed toHttpServer::workers()
. -
HttpServer::start_ssl()
andHttpServer::start_tls()
deprecated. UseHttpServer::bind_ssl()
andHttpServer::bind_tls()
instead. -
HttpRequest::extensions()
returns read only reference to the request's ExtensionHttpRequest::extensions_mut()
returns mutable reference. -
FromRequest::from_request()
accepts mutable reference to a request -
FromRequest::Result
has to implementInto<Reply<Self>>
-
HttpRequest::query()
is deprecated. UseQuery
extractor.fn index(q: Query<HashMap<String, String>>) -> Result<..> { ... }
or
let q = Query::<HashMap<String, String>>::extract(req);
Migration from 0.4 to 0.5
-
HttpResponseBuilder::body()
,.finish()
,.json()
methods returnHttpResponse
instead ofResult<HttpResponse>
-
actix_web::Method
,actix_web::StatusCode
,actix_web::Version
moved toactix_web::http
module -
actix_web::header
moved toactix_web::http::header
-
NormalizePath
moved toactix_web::http
module -
HttpServer
moved toactix_web::server
, added newactix_web::server::new()
function, shortcut foractix_web::server::HttpServer::new()
-
DefaultHeaders
middleware does not use separate builder, all builder methods moved to type itself -
StaticFiles::new()
's show_index parameter removed, useshow_files_listing()
method instead. -
CookieSessionBackendBuilder
removed, all methods moved toCookieSessionBackend
type -
actix_web::httpcodes
module is deprecated,HttpResponse::Ok()
,HttpResponse::Found()
and otherHttpResponse::XXX()
functions should be used instead -
ClientRequestBuilder::body()
returnsResult<_, actix_web::Error>
instead ofResult<_, http::Error>
-
Application
renamed to aApp
-
actix_web::Reply
,actix_web::Resource
moved toactix_web::dev