mirror of
https://github.com/divkit/divkit.git
synced 2026-05-07 20:02:32 +00:00
613b433cc1
commit_hash:91ee6d5933ef8c09be1c4f3fbd72ed7d689931e0
32 lines
491 B
Kotlin
32 lines
491 B
Kotlin
package cloud.divkit
|
|
|
|
data class Request(
|
|
val httpMethod: String?,
|
|
val headers: Map<String, String> = mapOf(),
|
|
val body: String = ""
|
|
)
|
|
|
|
data class Response(
|
|
val statusCode: Int,
|
|
val body: String
|
|
)
|
|
|
|
fun handle(request: Request): Response {
|
|
return Response(200, card)
|
|
}
|
|
|
|
private const val card = """
|
|
{
|
|
"log_id": "cloud_divkit",
|
|
"states": [
|
|
{
|
|
"state_id": 0,
|
|
"div": {
|
|
"type": "text",
|
|
"text": "Hello, Username!"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
"""
|