I’d like to call one of my route from my ktor serv...
# ktor
s
I’d like to call one of my route from my ktor server (triggered by a Job). How should I proceed? Do I need to make a request using the ktor client?
a
Could you please explain what you mean by calling a route?
s
It's an endpoint I've declared in my ktor backend. I've set up a scheduler pattern with quartz and I'd like to call this endpoint when the job gets triggered.
a
You can make a request using an HTTP client or extract the code from the route’s handler to a function and call it.
👍 1
s
I was also considering extracting the code in the route. Thanks for confirming for using the client! (I get a bit confused between the server and the client frameworks)