Skip to content
Discussion options

You must be logged in to vote

you can try

client.plugin.plugin(HttpSend).intercept { request ->
         val originUrl=request.url.buildString()
         if (originUrl.startsWith(BASE_URL)){
              request.url(Url(originUrl.replaceFirst(BASE_URL, "your new base url")))
         }
         execute(request)
      }

https://ktor.io/docs/client-http-send.html

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@jnocz
Comment options

Answer selected by jnocz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants