RestClient is internally based on jQuery ajax() <h...
# kvision
r
RestClient is internally based on jQuery ajax() https://api.jquery.com/jquery.ajax/ and to add headers to your request you can use
beforeSend
parameter:
Copy code
val resultPromise = client.remoteCall("http://example.com/post_endpoint", obj { value = "test" }, HttpMethod.POST, beforeSend = { xhr, _ ->
    xhr.setRequestHeader("Authorization", "Bearer token")
    true
})