# Chaining requests in Route TestKit

**URL:** <https://discuss.akka.io/t/chaining-requests-in-route-testkit/2051>\
**Category:** Akka HTTP\
**Created:** [September 5, 2018, 9:25am UTC](https://discuss.akka.io/t/chaining-requests-in-route-testkit/2051 "2018-09-05T09:25:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kordek](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.akka.io/kordek/32/993_2.png) [@kordek](https://discuss.akka.io/u/kordek)\
**Post date:** [September 5, 2018, 9:25am UTC](https://discuss.akka.io/t/chaining-requests-in-route-testkit/2051/1 "2018-09-05T09:25:40Z")

</div>

Hello

I am testing some simple API with Route TestKit and I would like to know if it is possible to cleanly chain requests. Let’s say I want to test that the result of the get, and then a post, gives certain result. What is the cleanest/most idiomatic way to achieve that?

Thanks  
Paweł

---

<div class="post-metadata">

**Author:** ![kordek](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.akka.io/kordek/32/993_2.png) [@kordek](https://discuss.akka.io/u/kordek)\
**Post date:** [September 5, 2018, 10:07am UTC](https://discuss.akka.io/t/chaining-requests-in-route-testkit/2051/2 "2018-09-05T10:07:25Z")

</div>

Follow-up:

> <https://stackoverflow.com/questions/52181921/chaining-requests-in-route-testkit>

---

<div class="post-metadata">

**Author:** ![jrudolph](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.akka.io/jrudolph/32/80_2.png) [@jrudolph](https://discuss.akka.io/u/jrudolph)\
**Post date:** [September 13, 2018, 10:18am UTC](https://discuss.akka.io/t/chaining-requests-in-route-testkit/2051/3 "2018-09-13T10:18:36Z")

</div>

I’d say just run the checks one after each other.

```scala
val route = ???

request1 ~> route ~> check { ... }
request2 ~> route ~> check { ... }
// etc.

```

Anything that would speak against that?

---

<div class="post-metadata">

**Author:** ![kordek](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.akka.io/kordek/32/993_2.png) [@kordek](https://discuss.akka.io/u/kordek)\
**Post date:** [November 7, 2018, 2:58pm UTC](https://discuss.akka.io/t/chaining-requests-in-route-testkit/2051/4 "2018-11-07T14:58:04Z")

</div>

Thank you. Nothing speaks against that, I was just checking if there exists some shortcut that I am not aware of :)
