title: Vertx: How to verify auth before handle body request?
body: <p>How to verify auth before handle body request?</p>
  
  <p>I'm using vertx:</p>
  
  <pre><code>vertxVersion = '3.8.3'
  implementation "io.vertx:vertx-core:$rootProject.vertxVersion"
  implementation "io.vertx:vertx-web:$rootProject.vertxVersion"
  implementation "io.vertx:vertx-lang-kotlin:$rootProject.vertxVersion"
  implementation "io.vertx:vertx-lang-kotlin-coroutines:$rootProject.vertxVersion"
  implementation "io.vertx:vertx-mongo-client:$rootProject.vertxVersion"
  implementation "io.vertx:vertx-auth-mongo:$rootProject.vertxVersion"
  implementation "io.vertx:vertx-auth-jwt:$rootProject.vertxVersion"
  </code></pre>
  
  <p>I want to verify auth before handle body request. But I got error <code>java.lang.IllegalStateException: Request has already been read</code></p>
  
  <p>Reproduce by use delay on suspend function:</p>
  
  <pre><code>router.handler { context -&gt;
              launch {
                  context.request().setExpectMultipart(true)
                  delay(100) //This line is sample for a verify auth process
                  context.next()
              }
          }
          .handler {context -&gt;
              println("2")
              context.request()
                  .handler {
                      b -&gt; println("buff ${b.length()}")
                  }
                  .endHandler {
                      println("end handle")
                      context.success("ok")
                  }
          }.baseHandle(
              fn
          ).failureHandler {
              println("fail: ${it.failure()}")
              it.error()
          }
  </code></pre>
  
  <p>When run <code>delay(100)</code> (this's sample for a verify process), I got the error above. If I comment <code>delay(100)</code>, It's will be working fine.</p>