Created
February 3, 2019 16:05
-
-
Save PankajWorks/029868ea95b26b49c2c8700f05340d2e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
path("in") { | |
extractUri { uri => | |
val st:Future[String] = getDefaultStrategy("abc").map(st=>st.name).recover{case f => "invalid" } | |
val urlTo = s match { | |
case "case1" => UriBuilder.build("abc").withPath(Uri.Path("/test/continue")).withQuery(Uri.Query(uri.rawQueryString)) | |
case "case2" => UriBuilder.build("abc").withPath(Uri.Path("/test/login")).withQuery(Uri.Query(uri.rawQueryString)) | |
case _ => UriBuilder.build("abc").withPath(Uri.Path("/test/login")).withQuery(Uri.Query(uri.rawQueryString)) | |
} | |
// After the future resolve we want to redirect using redirect(urlTo, StatusCodes.SeeOther) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment