this endpoint ONLY accepts the POST http method, to get the DSPACE-XSRF-TOKEN you can make a GET on /server/api/authn/status and then make the POST, here is a snippet written in scala I use to authenticate:
val responseStatus: Response[String] = quickRequest
.send()
val dspaceXsrfToken: String = responseStatus.header("dspace-xsrf-token").getOrElse("")
val responseLogin = quickRequest
.cookie("DSPACE-XSRF-COOKIE", dspaceXsrfToken)
.header("X-XSRF-TOKEN", dspaceXsrfToken)
.body(Map("user" -> user, "password" -> pass))
.send()