Request
open class Request(baseUrl: String, headers: Map<String, String>, body: dynamic, referrer: String?, referrerPolicy: dynamic, mode: RequestMode?, credentials: RequestCredentials?, cache: RequestCache?, redirect: RequestRedirect?, integrity: String?, keepalive: Boolean?, reqWindow: Any?, authentication: Authentication?)
Content copied to clipboard
Represents the common fields an attributes of a given set of http requests.
Use it to define common headers, error-handling, base url, etc. for a specific API for example. By calling one of the executing methods like get or post a specific request is built from the template and send to the server.
Constructors
Request
Link copied to clipboard
fun Request(baseUrl: String = "", headers: Map<String, String> = emptyMap(), body: dynamic = undefined, referrer: String? = undefined, referrerPolicy: dynamic = undefined, mode: RequestMode? = undefined, credentials: RequestCredentials? = undefined, cache: RequestCache? = undefined, redirect: RequestRedirect? = undefined, integrity: String? = undefined, keepalive: Boolean? = undefined, reqWindow: Any? = undefined, authentication: Authentication? = null)
Content copied to clipboard
Functions
acceptJson
Link copied to clipboard
arrayBuffer
Link copied to clipboard
authentication
Link copied to clipboard
cacheControl
Link copied to clipboard
contentType
Link copied to clipboard
credentials
Link copied to clipboard
referrerPolicy
Link copied to clipboard
requestMode
Link copied to clipboard