Skip to content

0.0.18

Pre-release
Pre-release
Compare
Choose a tag to compare
@programadorthi programadorthi released this 07 Aug 14:39
· 8 commits to main since this release

What's new

  • Added callWithBody function that helps to call a route passing a custom body value.
    • Based on Ktor Handling request objects, to send or receive a body do:
      router.handle(path = "...") {
          val body = call.receiveNullable<AnyKindValueType>()
          // or
          val body = call.receive<AnyKindValueType>() // throw an exception whether there is no value sent
      }
      
      // to sent a body
      router.callWithBody(uri = "...", body = AnyKindValue)
  • Added canHandle* functions that receive a RouteMethod to check based on name or path combined with the provided method.
  • Added RouteMethod optional parameter to redirectTo* functions to redirect to another name or path that haven't the same method.

Full Changelog: 0.0.17...0.0.18