Hi folks, a few months ago I've asked about how to...
# ktor
v
Hi folks, a few months ago I've asked about how to get the hostname/port and @cy was kind enough to point me out that it's not possible. I have a similar question again, this time I need to find a way to simulate the same behavior as one would have if running a Servlet and using
getRequestUrl + getQueryString
, I know how to obtain the path of a given
route
, and the query string, it's also possible to find the
host
, but I could not find a way to determine the full original request as in
<scheme://host:<port>/path?query>
Is it possible (even without port for now, at least scheme would be nice to have)
p
Have you looked at
io.ktor.http.RequestConnectionPoint
which is accessible from inside your routes via
io.ktor.request.ApplicationRequest#local
?
v
Thank you Pavel that really did the trick 🙂
👍 1