hi, we have a ktor http client trying to post to a...
# ktor
j
hi, we have a ktor http client trying to post to a ktor server with cookies. the server isn’t seeing any
request.cookies[]
, anyone have any idea why? setup in thread
Copy code
val httpClient = HttpClient {
  install(HttpCookies) {
      storage = AcceptAllCookiesStorage()
  }
}
with(httpClient) {
  post<HttpResponse>(appUrl) {
    // none of these methods work
    //headers.append("Cookie", "${appCookie.name}=${appCookie.value};")
    //headers.set("Cookie", "${appCookie.name}=${appCookie.value};")
    //header("Cookie", "${appCookie.name}=${appCookie.value};")
    headers.appendAll(Headers.build { //this also does NOT work
        append("Cookie", "${appCookie.name}=${appCookie.value};")
    })
    
    body = TextContent(bodyAsString, ContentType.Application.Json)
  }
}
nevermind, we figured it was how we were creating our client