1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-08-31 17:07:01 +02:00

add scopes

This commit is contained in:
Nikolay Kim
2019-03-03 21:02:01 -08:00
parent 8502c32a3c
commit 34171fa7f5
6 changed files with 1004 additions and 4 deletions

View File

@@ -4,7 +4,7 @@ use std::rc::Rc;
use actix_http::http::header::{Header, HeaderName, IntoHeaderValue};
use actix_http::http::{HttpTryFrom, Method, Version};
use actix_http::test::TestRequest as HttpTestRequest;
use actix_http::{Extensions, PayloadStream};
use actix_http::{Extensions, PayloadStream, Request};
use actix_router::{Path, Url};
use bytes::Bytes;
@@ -135,8 +135,13 @@ impl TestRequest {
)
}
/// Complete request creation and generate `Request` instance
pub fn to_request(mut self) -> Request<PayloadStream> {
self.req.finish()
}
/// Complete request creation and generate `HttpRequest` instance
pub fn to_request(mut self) -> HttpRequest {
pub fn to_http_request(mut self) -> HttpRequest {
let req = self.req.finish();
ServiceRequest::new(