scittle

DerTev 2023-04-07T18:24:23.117699Z

I try to login to PocketBase with cljs-ajax, but with

(defn auth
  "Authenticate with `identity` and `password`"
  [identity password]
  (ajax/POST "/api/collections/users/auth-with-password"
    {:params {:identity identity
              :password password}
     :format :json}
    #(println (pr-str %))))
I get the error
{
  "errorDetails": "code=415, message=Unsupported Media Type",
  "errorMessage": "An error occurred while loading the submitted data."
}
any idea, why I get the error?

borkdude 2023-04-07T18:41:12.233799Z

Maybe check in the browser console which content-type header is being sent and which accept header is sent?