Skip to content

Commit beef731

Browse files
committed
Add user-agent to kotlin
1 parent 24cd303 commit beef731

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

templates/kotlin/src/main/kotlin/io/appwrite/Client.kt.twig

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ class Client @JvmOverloads constructor(
6262
init {
6363
headers = mutableMapOf(
6464
"content-type" to "application/json",
65-
"User-Agent" to "{{spec.title | caseUcfirst}}Kotlin/${BuildConfig.SDK_VERSION} (${os.type()} ${os.version()}; ${os.arch()})",
65+
"origin" to "{{ spec.title | caseLower }}-kotlin://${context.packageName}",
66+
"user-agent" to "${context.packageName}/${appVersion}, ${System.getProperty("http.agent")}",
6667
"x-sdk-version" to "{{spec.title | caseDash}}:{{ language.name | caseLower }}:${BuildConfig.SDK_VERSION}"{% if spec.global.defaultHeaders | length > 0 %},{% endif %}
6768

6869

0 commit comments

Comments
 (0)