-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Properly rename file and add another extension function
- Loading branch information
1 parent
a080543
commit 80e02e7
Showing
2 changed files
with
6 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 5 additions & 1 deletion
6
...de/jensklingenberg/ktorfit/annotations.kt → ...de/jensklingenberg/ktorfit/Annotations.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,13 @@ | ||
package de.jensklingenberg.ktorfit | ||
|
||
import io.ktor.client.request.HttpRequest | ||
import io.ktor.client.request.HttpRequestBuilder | ||
import io.ktor.util.AttributeKey | ||
|
||
public val annotationsAttributeKey: AttributeKey<List<Any>> = AttributeKey("__ktorfit_attribute_annotations") | ||
|
||
public val HttpRequest.annotations: List<Any> | ||
inline get() = attributes.getOrNull(annotationsAttributeKey) ?: emptyList() | ||
|
||
public val HttpRequestBuilder.annotations: List<Any> | ||
get() = attributes.getOrNull(annotationsAttributeKey) ?: emptyList() | ||
inline get() = attributes.getOrNull(annotationsAttributeKey) ?: emptyList() |