Skip to content

POST request returns 403 error on deployed app #20

Open
@jpcurbelo

Description

@jpcurbelo

I've followed this tutorial to build a KMM app. Everything works fine when the app is running on the local server but the POST method returns Error 403 when deployed on Heroku. This is the function on the Client side.

val endpoint = window.location.origin // only needed until ktorio/ktor#1695 is resolved

val jsonClient = HttpClient {
install(JsonFeature) { serializer = KotlinxSerializer() }
}

suspend fun sendfeedback(userinfo: UserInfo) {

jsonClient.post<Unit>(endpoint + UserInfo.path) {

    contentType(ContentType.Application.Json)
    body = userinfo
}

}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions