Crow allows users to handle requests that may not come from the network. This is done by calling the `handle(req, res)` method and providing a request and response objects. Which causes crow to identify and run the appropriate handler, returning the resulting response.
app.validate(); //Used to make sure all the route handlers are in order.
{
request req;
response res;
req.url = "/place";
app.handle(req, res); //res will contain a code of 200, and a response body of "hi"
}
```
!!! note
This method is the simpler of the two and is usually all you really need to test your routes.
!!! warning
This method does not send any data, nor does it run any post handle code, so things like static file serving (as far as sending the actual data) or compression cannot be tested using this method.
This method involves creating a simple [ASIO](https://think-async.com/Asio/) client that sends the request and receives the response. It is considerably more complex than the earlier method, but it is both more realistic and includes post handle operations.
```cpp linenums="1"
static char buf[2048];
SimpleApp app;
CROW_ROUTE(app, "/")([] { return "A"; });
auto _ = async(launch::async,[&] { app1.bindaddr("127.0.0.1").port(45451).run(); });
Be absolutely sure that the line `app.stop()` runs, whether the test fails or succeeds. Not running it WILL CAUSE OTHER TESTS TO FAIL AND THE TEST TO HANG UNTIL THE PROCESS IS TERMINATED.