Example

valroute=scheme("http"){extract(_.request.uri){uri⇒redirect(uri.copy(scheme="https"),MovedPermanently)}}~scheme("https"){complete(s"Safe and secure!")}Get("http://www.example.com/hello")~>route~>check{status===MovedPermanentlyheader[Location]===Some(Location(Uri("https://www.example.com/hello")))}Get("https://www.example.com/hello")~>route~>check{responseAs[String]==="Safe and secure!"}