RequestData

fun RequestData(method: String, relativeUrl: String, headers: List<HeaderData> = emptyList(), queries: List<QueryData> = emptyList(), fields: List<FieldData> = emptyList(), parts: Map<String, Any> = emptyMap(), bodyData: Any? = null, qualifiedRawTypeName: String, requestBuilder: <ERROR CLASS>.() -> Unit = {})

Parameters

method

HTTP Keyword of requested Http Method Type

relativeUrl

This is the request relative url path e.g. "posts/1"

headers

list of Headers that will be used for request

queries

list of query parameters that will be added to the requested url

fields

map of fields parameters that will be added to the formData Body

bodyData

data that will send to with the request

qualifiedRawTypeName

This is the qualifiedName of requested return type It will be used by ResponseConverter to check if they support the type Because on JS the qualifiedName reflection does not exist, it is inserted as arguments by the Compiler Plugin