Skip to content

Commit e33aff2

Browse files
committed
ktor constants
1 parent b11b388 commit e33aff2

File tree

1 file changed

+22
-0
lines changed
  • amplifyframework/src/commonMain/kotlin/com/jump/sdk/amplifyframework

1 file changed

+22
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
package com.jump.sdk.amplifyframework
2+
3+
import io.ktor.http.ContentType
4+
5+
// Configure Ktor HttpClient with:
6+
// install(ContentNegotiation) {
7+
// json(
8+
// Json { ... },
9+
// contentType = AmzJson,
10+
// )
11+
// }
12+
// And then call with:
13+
// client.post(your cognito endpoint) {
14+
// contentType(AmzJson)
15+
// header(AmzActionHeader, CognitoAction.headerValue)
16+
// setBody(requestBody)
17+
// }
18+
19+
object CognitoKtor {
20+
val AmzJson = ContentType("application", "x-amz-json-1.1")
21+
const val AmzTargetHeader = "X-Amz-Target"
22+
}

0 commit comments

Comments
 (0)