KTOR client docs: looking at typesafe resources, h...
# ktor
b
KTOR client docs: looking at typesafe resources, how do I add headers or custom request attributes?
✅ 1
a
You can use the HttpRequestBuilder block the same way as with regular request methods:
Copy code
val client = HttpClient(CIO) {
    install(Resources)
}
client.get(Articles()) {
    header("header", "value")
    attributes.put(AttributeKey<String>("key"), "value")
}
// ...
@Resource("/articles")
class Articles()
b
ah, I see, thanks