You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to use a proxy between my Kord rest instance and the Discord rest endpoints, this proxy will be handling rate limits as well. I've noticed that there is currently no no-op rate limit handler either. In my quest to use a proxy I decided to "implement" my own RequestHandler, to do this I was going to copy the current default RequestHandler implementation and modify it to fit my needs, make it use another URL than the Discord base URL as well as add headers per request basis (requests will need to send a token that will vary through the lifetime of the application in the headers, as well as some other headers I need to add.) Upon attempting this however I discovered another issue with this method, in that the optional serializer for the KtorRequestException class is marked as internal (
), and thus cannot be used by any custom implementations of the RequestHandler, even if they also use ktor.
Here's an outline of the things I'd like to see added/changed
Add support for proxies
Add some way to change the Request before it's actually executed in whatever RequestHandler (e.g. adding/changing headers)
Mark the optional serializer as public for KtorRequestException to allow other RequestHandler implementations that also make use of ktor to use this already existing model.
Cheers,
Amy.
The text was updated successfully, but these errors were encountered:
Hi friendly Kord contributors,
I would like to use a proxy between my Kord rest instance and the Discord rest endpoints, this proxy will be handling rate limits as well. I've noticed that there is currently no no-op rate limit handler either. In my quest to use a proxy I decided to "implement" my own RequestHandler, to do this I was going to copy the current default RequestHandler implementation and modify it to fit my needs, make it use another URL than the Discord base URL as well as add headers per request basis (requests will need to send a token that will vary through the lifetime of the application in the headers, as well as some other headers I need to add.) Upon attempting this however I discovered another issue with this method, in that the optional serializer for the KtorRequestException class is marked as internal (
kord/rest/src/main/kotlin/route/Route.kt
Line 40 in bc0e76b
Here's an outline of the things I'd like to see added/changed
Cheers,
Amy.
The text was updated successfully, but these errors were encountered: