Skip to content

Commit 1094b59

Browse files
committed
feat: warn android
1 parent 5cc6761 commit 1094b59

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

templates/android/library/src/main/java/io/package/Client.kt.twig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -473,6 +473,14 @@ class Client @JvmOverloads constructor(
473473
it.cancel(error)
474474
return
475475
}
476+
477+
val warnings = response.headers["x-{{ spec.title | lower }}-warning"]
478+
if (warnings != null) {
479+
warnings.split(";").forEach { warning ->
480+
System.out.println("Warning: $warning")
481+
}
482+
}
483+
476484
when {
477485
responseType == Boolean::class.java -> {
478486
it.resume(true as T)

0 commit comments

Comments
 (0)