mirror of https://github.com/fafhrd91/actix-web
update changelog
This commit is contained in:
parent
eb6167c80f
commit
d59316fd25
|
@ -7,12 +7,14 @@
|
|||
### Changed
|
||||
* Compress middleware will return 406 Not Acceptable when no content encoding is acceptable to the client. [#2344]
|
||||
* Move `BaseHttpResponse` to `dev::Response`. [#2379]
|
||||
* Enable `TestRequest::param` to accept more than just static strings. [#2172]
|
||||
* Minimum supported Rust version (MSRV) is now 1.51.
|
||||
|
||||
### Fixed
|
||||
* Fix quality parse error in Accept-Encoding header. [#2344]
|
||||
* Re-export correct type at `web::HttpResponse`. [#2379]
|
||||
|
||||
[#2172]: https://github.com/actix/actix-web/pull/2172
|
||||
[#2325]: https://github.com/actix/actix-web/pull/2325
|
||||
[#2344]: https://github.com/actix/actix-web/pull/2344
|
||||
[#2379]: https://github.com/actix/actix-web/pull/2379
|
||||
|
|
14
src/test.rs
14
src/test.rs
|
@ -470,7 +470,15 @@ impl TestRequest {
|
|||
self
|
||||
}
|
||||
|
||||
/// Set request path pattern parameter
|
||||
/// Set request path pattern parameter.
|
||||
///
|
||||
/// # Examples
|
||||
/// ```
|
||||
/// use actix_web::test::TestRequest;
|
||||
///
|
||||
/// let req = TestRequest::default().param("foo", "bar");
|
||||
/// let req = TestRequest::default().param("foo".to_owned(), "bar".to_owned());
|
||||
/// ```
|
||||
pub fn param(
|
||||
mut self,
|
||||
name: impl Into<Cow<'static, str>>,
|
||||
|
@ -480,13 +488,13 @@ impl TestRequest {
|
|||
self
|
||||
}
|
||||
|
||||
/// Set peer addr
|
||||
/// Set peer addr.
|
||||
pub fn peer_addr(mut self, addr: SocketAddr) -> Self {
|
||||
self.peer_addr = Some(addr);
|
||||
self
|
||||
}
|
||||
|
||||
/// Set request payload
|
||||
/// Set request payload.
|
||||
pub fn set_payload<B: Into<Bytes>>(mut self, data: B) -> Self {
|
||||
self.req.set_payload(data);
|
||||
self
|
||||
|
|
Loading…
Reference in New Issue