How do you add a header value that is stored in da...
# ktor
i
How do you add a header value that is stored in datastore and that can change between requests? Default request is not working because the datastore methods are suspend.
a
Unfortunately, that's impossible at the moment without blocking the thread. You can follow KTOR-4504 for updates.
i
Thanks is there another workaround than getting the value and adding the header manually for every request?
a
To use
runBlocking
in the configuration block of the
DefaultRequest
plugin.
i
You're right will look into that.
Actually found the intercept plugin and that works great.