mirror of
https://github.com/fafhrd91/actix-web
synced 2025-08-22 21:55:10 +02:00
add convinience ClientRequest::build_from() from HttpRequest
This commit is contained in:
@@ -71,6 +71,12 @@ impl HttpResponse {
|
||||
}
|
||||
}
|
||||
|
||||
/// Create http response builder
|
||||
#[inline]
|
||||
pub fn build_from<T: Into<HttpResponseBuilder>>(source: T) -> HttpResponseBuilder {
|
||||
source.into()
|
||||
}
|
||||
|
||||
/// Constructs a response
|
||||
#[inline]
|
||||
pub fn new(status: StatusCode, body: Body) -> HttpResponse {
|
||||
|
Reference in New Issue
Block a user