diff --git a/src/net/system.rs b/src/net/system.rs index 58e22a8..7396c89 100644 --- a/src/net/system.rs +++ b/src/net/system.rs @@ -88,7 +88,7 @@ pub struct OnRequest<'net> { request: reqwest::Request, } impl<'net> OnRequest<'net> { - pub fn response(self, response: reqwest::Response) { + pub fn respond(self, response: reqwest::Response) { self.net._on(self.request, response) } } diff --git a/tests/net.rs b/tests/net.rs index 14374d6..426b919 100644 --- a/tests/net.rs +++ b/tests/net.rs @@ -17,7 +17,7 @@ async fn test_get() -> TestResult { .body("Get OK") .expect("request body"); - net.on(request).response(my_response.into()); + net.on(request).respond(my_response.into()); //when let response = net.send(client.get(url)).await?; @@ -43,7 +43,7 @@ async fn test_post() -> TestResult { .body("Post OK") .expect("request body"); - net.on(request).response(my_response.into()); + net.on(request).respond(my_response.into()); //when let response = net.send(client.post(url)).await?; @@ -70,7 +70,7 @@ async fn test_unused_post() { .body("Post OK") .expect("request body"); - net.on(request).response(my_response.into()); + net.on(request).respond(my_response.into()); //when // don't send the planned request