-
Notifications
You must be signed in to change notification settings - Fork 944
Add extension functions for Ktor plugins #10963
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
fun capturedRequestHeaders(vararg headers: String) { | ||
capturedRequestHeaders(headers.asIterable()) | ||
} | ||
|
||
fun capturedRequestHeaders(headers: Iterable<String>) { | ||
setCapturedRequestHeaders(headers.toList()) | ||
} | ||
|
||
fun setCapturedResponseHeaders(vararg headers: String) = setCapturedResponseHeaders(headers.asList()) | ||
|
||
fun setCapturedResponseHeaders(headers: List<String>) { | ||
httpAttributesExtractorBuilder.setCapturedResponseHeaders(headers) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@marychatte would it make sense to deprecate the set*()
methods?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, thanks. I will do it
Hi! I just wanted to ask if there are any estimates when the PR can be merged? |
hey @marychatte! sorry for the delay, just merged and it will be included in the upcoming release |
Resolves #10617
Earlier, an issue about adding extension functions for plugins that allow writing existing code in the Ktor DSL style was opened.
In this PR, such new functions were added.
These new functions we used in the example where also can be found examples of usages new functions for server and client