Andrew O'Hara
07/21/2022, 9:00 PM"/pattern/{rest:.*}" bind { req: Request -> Response(OK).body(req.path("rest") ?: "") }
I've been unable to replicate this for http4k-contract
in a way it will work in a Swagger UI. I've even tried making a lens so it can fit in to the ContractRoute
definition, like:
val restLens = Path.regex(".*").of("rest")
val route = "pattern" / restLens
But it just results in a 404.
Has anyone ever gotten this to work with Swagger UI?val restLens = Path.string().of("rest:.*")
dave
07/21/2022, 9:11 PMAndrew O'Hara
07/21/2022, 10:05 PMArnab
07/21/2022, 11:10 PMAndrew O'Hara
07/22/2022, 7:52 PMhttp://<proxy-host>/<device-token>/<target-uri>
where the device-token
is used to lookup the IOT device's connection. We get the connection, and then send the device something like
<http://localhost/><target-uri>
In most cases, we're actually communicating a custom TCP protocol, but the HTTP request above illustrates the point.