aboutsummaryrefslogtreecommitdiff
path: root/api/pl.treksoft.kvision.rest/-rest-client/request.html
blob: 8c333ddd3eab847b2731efed910b7cc3af74d637 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<HTML>
<HEAD>
<meta charset="UTF-8">
<title>RestClient.request - kvision</title>
<link rel="stylesheet" href="../../../style.css">
</HEAD>
<BODY>
<a href="../../index.html">kvision</a>&nbsp;/&nbsp;<a href="../index.html">pl.treksoft.kvision.rest</a>&nbsp;/&nbsp;<a href="index.html">RestClient</a>&nbsp;/&nbsp;<a href="./request.html">request</a><br/>
<br/>
<h1>request</h1>
<a name="pl.treksoft.kvision.rest.RestClient$request(kotlin.String, kotlin.Any, pl.treksoft.kvision.rest.HttpMethod, kotlin.String, kotlin.Function2((pl.treksoft.jquery.JQueryXHR, pl.treksoft.jquery.JQueryAjaxSettings, kotlin.Boolean)), kotlin.Function1((kotlin.Any, )))"></a>
<code><span class="keyword">inline</span> <span class="keyword">fun </span><span class="symbol">&lt;</span><span class="keyword">reified</span>&nbsp;<span class="identifier">T</span>&nbsp;<span class="symbol">:</span>&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html"><span class="identifier">Any</span></a><span class="symbol">&gt;</span> <span class="identifier">request</span><span class="symbol">(</span><span class="identifier" id="pl.treksoft.kvision.rest.RestClient$request(kotlin.String, kotlin.Any, pl.treksoft.kvision.rest.HttpMethod, kotlin.String, kotlin.Function2((pl.treksoft.jquery.JQueryXHR, pl.treksoft.jquery.JQueryAjaxSettings, kotlin.Boolean)), kotlin.Function1((kotlin.Any, )))/url">url</span><span class="symbol">:</span>&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html"><span class="identifier">String</span></a><span class="symbol">, </span><span class="identifier" id="pl.treksoft.kvision.rest.RestClient$request(kotlin.String, kotlin.Any, pl.treksoft.kvision.rest.HttpMethod, kotlin.String, kotlin.Function2((pl.treksoft.jquery.JQueryXHR, pl.treksoft.jquery.JQueryAjaxSettings, kotlin.Boolean)), kotlin.Function1((kotlin.Any, )))/data">data</span><span class="symbol">:</span>&nbsp;<span class="keyword">dynamic</span>&nbsp;<span class="symbol">=</span>&nbsp;null<span class="symbol">, </span><span class="identifier" id="pl.treksoft.kvision.rest.RestClient$request(kotlin.String, kotlin.Any, pl.treksoft.kvision.rest.HttpMethod, kotlin.String, kotlin.Function2((pl.treksoft.jquery.JQueryXHR, pl.treksoft.jquery.JQueryAjaxSettings, kotlin.Boolean)), kotlin.Function1((kotlin.Any, )))/method">method</span><span class="symbol">:</span>&nbsp;<a href="../-http-method/index.html"><span class="identifier">HttpMethod</span></a>&nbsp;<span class="symbol">=</span>&nbsp;HttpMethod.GET<span class="symbol">, </span><span class="identifier" id="pl.treksoft.kvision.rest.RestClient$request(kotlin.String, kotlin.Any, pl.treksoft.kvision.rest.HttpMethod, kotlin.String, kotlin.Function2((pl.treksoft.jquery.JQueryXHR, pl.treksoft.jquery.JQueryAjaxSettings, kotlin.Boolean)), kotlin.Function1((kotlin.Any, )))/contentType">contentType</span><span class="symbol">:</span>&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html"><span class="identifier">String</span></a>&nbsp;<span class="symbol">=</span>&nbsp;"application/json"<span class="symbol">, </span><span class="keyword">noinline</span> <span class="identifier" id="pl.treksoft.kvision.rest.RestClient$request(kotlin.String, kotlin.Any, pl.treksoft.kvision.rest.HttpMethod, kotlin.String, kotlin.Function2((pl.treksoft.jquery.JQueryXHR, pl.treksoft.jquery.JQueryAjaxSettings, kotlin.Boolean)), kotlin.Function1((kotlin.Any, )))/beforeSend">beforeSend</span><span class="symbol">:</span>&nbsp;<span class="symbol">(</span><span class="symbol">(</span><span class="identifier">JQueryXHR</span><span class="symbol">,</span>&nbsp;<span class="identifier">JQueryAjaxSettings</span><span class="symbol">)</span>&nbsp;<span class="symbol">-&gt;</span>&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html"><span class="identifier">Boolean</span></a><span class="symbol">)</span><span class="symbol">?</span>&nbsp;<span class="symbol">=</span>&nbsp;null<span class="symbol">, </span><span class="keyword">noinline</span> <span class="identifier" id="pl.treksoft.kvision.rest.RestClient$request(kotlin.String, kotlin.Any, pl.treksoft.kvision.rest.HttpMethod, kotlin.String, kotlin.Function2((pl.treksoft.jquery.JQueryXHR, pl.treksoft.jquery.JQueryAjaxSettings, kotlin.Boolean)), kotlin.Function1((kotlin.Any, )))/transform">transform</span><span class="symbol">:</span>&nbsp;<span class="symbol">(</span><span class="symbol">(</span><span class="keyword">dynamic</span><span class="symbol">)</span>&nbsp;<span class="symbol">-&gt;</span>&nbsp;<span class="keyword">dynamic</span><span class="symbol">)</span><span class="symbol">?</span>&nbsp;<span class="symbol">=</span>&nbsp;null<span class="symbol">)</span><span class="symbol">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.js/-promise/index.html"><span class="identifier">Promise</span></a><span class="symbol">&lt;</span><a href="../-response/index.html"><span class="identifier">Response</span></a><span class="symbol">&lt;</span><a href="request.html#T"><span class="identifier">T</span></a><span class="symbol">&gt;</span><span class="symbol">&gt;</span></code>
<p>Helper inline function to automatically get deserializer for the result value with dynamic data.</p>
<h3>Parameters</h3>
<p><a name="url"></a>
<code>url</code> - an URL address</p>
<p><a name="data"></a>
<code>data</code> - data to be sent</p>
<p><a name="method"></a>
<code>method</code> - a HTTP method</p>
<p><a name="contentType"></a>
<code>contentType</code> - a content type of the request</p>
<p><a name="beforeSend"></a>
<code>beforeSend</code> - a content type of the request</p>
<p><a name="transform"></a>
<code>transform</code> - a function to transform the result of the call</p>
<p><strong>Return</strong><br/>
a promise of the response</p>
<a name="pl.treksoft.kvision.rest.RestClient$request(kotlin.String, pl.treksoft.kvision.rest.RestClient.request.V, pl.treksoft.kvision.rest.HttpMethod, kotlin.String, kotlin.Function2((pl.treksoft.jquery.JQueryXHR, pl.treksoft.jquery.JQueryAjaxSettings, kotlin.Boolean)))"></a>
<code><span class="keyword">inline</span> <span class="keyword">fun </span><span class="symbol">&lt;</span><span class="keyword">reified</span>&nbsp;<span class="identifier">V</span>&nbsp;<span class="symbol">:</span>&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html"><span class="identifier">Any</span></a><span class="symbol">&gt;</span> <span class="identifier">request</span><span class="symbol">(</span><span class="identifier" id="pl.treksoft.kvision.rest.RestClient$request(kotlin.String, pl.treksoft.kvision.rest.RestClient.request.V, pl.treksoft.kvision.rest.HttpMethod, kotlin.String, kotlin.Function2((pl.treksoft.jquery.JQueryXHR, pl.treksoft.jquery.JQueryAjaxSettings, kotlin.Boolean)))/url">url</span><span class="symbol">:</span>&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html"><span class="identifier">String</span></a><span class="symbol">, </span><span class="identifier" id="pl.treksoft.kvision.rest.RestClient$request(kotlin.String, pl.treksoft.kvision.rest.RestClient.request.V, pl.treksoft.kvision.rest.HttpMethod, kotlin.String, kotlin.Function2((pl.treksoft.jquery.JQueryXHR, pl.treksoft.jquery.JQueryAjaxSettings, kotlin.Boolean)))/data">data</span><span class="symbol">:</span>&nbsp;<a href="request.html#V"><span class="identifier">V</span></a><span class="symbol">, </span><span class="identifier" id="pl.treksoft.kvision.rest.RestClient$request(kotlin.String, pl.treksoft.kvision.rest.RestClient.request.V, pl.treksoft.kvision.rest.HttpMethod, kotlin.String, kotlin.Function2((pl.treksoft.jquery.JQueryXHR, pl.treksoft.jquery.JQueryAjaxSettings, kotlin.Boolean)))/method">method</span><span class="symbol">:</span>&nbsp;<a href="../-http-method/index.html"><span class="identifier">HttpMethod</span></a>&nbsp;<span class="symbol">=</span>&nbsp;HttpMethod.GET<span class="symbol">, </span><span class="identifier" id="pl.treksoft.kvision.rest.RestClient$request(kotlin.String, pl.treksoft.kvision.rest.RestClient.request.V, pl.treksoft.kvision.rest.HttpMethod, kotlin.String, kotlin.Function2((pl.treksoft.jquery.JQueryXHR, pl.treksoft.jquery.JQueryAjaxSettings, kotlin.Boolean)))/contentType">contentType</span><span class="symbol">:</span>&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html"><span class="identifier">String</span></a>&nbsp;<span class="symbol">=</span>&nbsp;"application/json"<span class="symbol">, </span><span class="keyword">noinline</span> <span class="identifier" id="pl.treksoft.kvision.rest.RestClient$request(kotlin.String, pl.treksoft.kvision.rest.RestClient.request.V, pl.treksoft.kvision.rest.HttpMethod, kotlin.String, kotlin.Function2((pl.treksoft.jquery.JQueryXHR, pl.treksoft.jquery.JQueryAjaxSettings, kotlin.Boolean)))/beforeSend">beforeSend</span><span class="symbol">:</span>&nbsp;<span class="symbol">(</span><span class="symbol">(</span><span class="identifier">JQueryXHR</span><span class="symbol">,</span>&nbsp;<span class="identifier">JQueryAjaxSettings</span><span class="symbol">)</span>&nbsp;<span class="symbol">-&gt;</span>&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html"><span class="identifier">Boolean</span></a><span class="symbol">)</span><span class="symbol">?</span>&nbsp;<span class="symbol">=</span>&nbsp;null<span class="symbol">)</span><span class="symbol">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.js/-promise/index.html"><span class="identifier">Promise</span></a><span class="symbol">&lt;</span><a href="../-response/index.html"><span class="identifier">Response</span></a><span class="symbol">&lt;</span><span class="keyword">dynamic</span><span class="symbol">&gt;</span><span class="symbol">&gt;</span></code>
<p>Helper inline function to automatically get serializer for the data.</p>
<h3>Parameters</h3>
<p><a name="url"></a>
<code>url</code> - an URL address</p>
<p><a name="data"></a>
<code>data</code> - data to be sent</p>
<p><a name="method"></a>
<code>method</code> - a HTTP method</p>
<p><a name="contentType"></a>
<code>contentType</code> - a content type of the request</p>
<p><a name="beforeSend"></a>
<code>beforeSend</code> - a content type of the request</p>
<p><strong>Return</strong><br/>
a promise of the response</p>
<a name="pl.treksoft.kvision.rest.RestClient$request(kotlin.String, pl.treksoft.kvision.rest.RestClient.request.V, kotlinx.serialization.DeserializationStrategy((pl.treksoft.kvision.rest.RestClient.request.T)), pl.treksoft.kvision.rest.HttpMethod, kotlin.String, kotlin.Function2((pl.treksoft.jquery.JQueryXHR, pl.treksoft.jquery.JQueryAjaxSettings, kotlin.Boolean)), kotlin.Function1((kotlin.Any, )))"></a>
<code><span class="keyword">inline</span> <span class="keyword">fun </span><span class="symbol">&lt;</span><span class="identifier">T</span>&nbsp;<span class="symbol">:</span>&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html"><span class="identifier">Any</span></a><span class="symbol">, </span><span class="keyword">reified</span>&nbsp;<span class="identifier">V</span>&nbsp;<span class="symbol">:</span>&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html"><span class="identifier">Any</span></a><span class="symbol">&gt;</span> <span class="identifier">request</span><span class="symbol">(</span><span class="identifier" id="pl.treksoft.kvision.rest.RestClient$request(kotlin.String, pl.treksoft.kvision.rest.RestClient.request.V, kotlinx.serialization.DeserializationStrategy((pl.treksoft.kvision.rest.RestClient.request.T)), pl.treksoft.kvision.rest.HttpMethod, kotlin.String, kotlin.Function2((pl.treksoft.jquery.JQueryXHR, pl.treksoft.jquery.JQueryAjaxSettings, kotlin.Boolean)), kotlin.Function1((kotlin.Any, )))/url">url</span><span class="symbol">:</span>&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html"><span class="identifier">String</span></a><span class="symbol">, </span><span class="identifier" id="pl.treksoft.kvision.rest.RestClient$request(kotlin.String, pl.treksoft.kvision.rest.RestClient.request.V, kotlinx.serialization.DeserializationStrategy((pl.treksoft.kvision.rest.RestClient.request.T)), pl.treksoft.kvision.rest.HttpMethod, kotlin.String, kotlin.Function2((pl.treksoft.jquery.JQueryXHR, pl.treksoft.jquery.JQueryAjaxSettings, kotlin.Boolean)), kotlin.Function1((kotlin.Any, )))/data">data</span><span class="symbol">:</span>&nbsp;<a href="request.html#V"><span class="identifier">V</span></a><span class="symbol">, </span><span class="identifier" id="pl.treksoft.kvision.rest.RestClient$request(kotlin.String, pl.treksoft.kvision.rest.RestClient.request.V, kotlinx.serialization.DeserializationStrategy((pl.treksoft.kvision.rest.RestClient.request.T)), pl.treksoft.kvision.rest.HttpMethod, kotlin.String, kotlin.Function2((pl.treksoft.jquery.JQueryXHR, pl.treksoft.jquery.JQueryAjaxSettings, kotlin.Boolean)), kotlin.Function1((kotlin.Any, )))/deserializer">deserializer</span><span class="symbol">:</span>&nbsp;<span class="identifier">DeserializationStrategy</span><span class="symbol">&lt;</span><a href="request.html#T"><span class="identifier">T</span></a><span class="symbol">&gt;</span><span class="symbol">, </span><span class="identifier" id="pl.treksoft.kvision.rest.RestClient$request(kotlin.String, pl.treksoft.kvision.rest.RestClient.request.V, kotlinx.serialization.DeserializationStrategy((pl.treksoft.kvision.rest.RestClient.request.T)), pl.treksoft.kvision.rest.HttpMethod, kotlin.String, kotlin.Function2((pl.treksoft.jquery.JQueryXHR, pl.treksoft.jquery.JQueryAjaxSettings, kotlin.Boolean)), kotlin.Function1((kotlin.Any, )))/method">method</span><span class="symbol">:</span>&nbsp;<a href="../-http-method/index.html"><span class="identifier">HttpMethod</span></a>&nbsp;<span class="symbol">=</span>&nbsp;HttpMethod.GET<span class="symbol">, </span><span class="identifier" id="pl.treksoft.kvision.rest.RestClient$request(kotlin.String, pl.treksoft.kvision.rest.RestClient.request.V, kotlinx.serialization.DeserializationStrategy((pl.treksoft.kvision.rest.RestClient.request.T)), pl.treksoft.kvision.rest.HttpMethod, kotlin.String, kotlin.Function2((pl.treksoft.jquery.JQueryXHR, pl.treksoft.jquery.JQueryAjaxSettings, kotlin.Boolean)), kotlin.Function1((kotlin.Any, )))/contentType">contentType</span><span class="symbol">:</span>&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html"><span class="identifier">String</span></a>&nbsp;<span class="symbol">=</span>&nbsp;"application/json"<span class="symbol">, </span><span class="keyword">noinline</span> <span class="identifier" id="pl.treksoft.kvision.rest.RestClient$request(kotlin.String, pl.treksoft.kvision.rest.RestClient.request.V, kotlinx.serialization.DeserializationStrategy((pl.treksoft.kvision.rest.RestClient.request.T)), pl.treksoft.kvision.rest.HttpMethod, kotlin.String, kotlin.Function2((pl.treksoft.jquery.JQueryXHR, pl.treksoft.jquery.JQueryAjaxSettings, kotlin.Boolean)), kotlin.Function1((kotlin.Any, )))/beforeSend">beforeSend</span><span class="symbol">:</span>&nbsp;<span class="symbol">(</span><span class="symbol">(</span><span class="identifier">JQueryXHR</span><span class="symbol">,</span>&nbsp;<span class="identifier">JQueryAjaxSettings</span><span class="symbol">)</span>&nbsp;<span class="symbol">-&gt;</span>&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html"><span class="identifier">Boolean</span></a><span class="symbol">)</span><span class="symbol">?</span>&nbsp;<span class="symbol">=</span>&nbsp;null<span class="symbol">, </span><span class="keyword">noinline</span> <span class="identifier" id="pl.treksoft.kvision.rest.RestClient$request(kotlin.String, pl.treksoft.kvision.rest.RestClient.request.V, kotlinx.serialization.DeserializationStrategy((pl.treksoft.kvision.rest.RestClient.request.T)), pl.treksoft.kvision.rest.HttpMethod, kotlin.String, kotlin.Function2((pl.treksoft.jquery.JQueryXHR, pl.treksoft.jquery.JQueryAjaxSettings, kotlin.Boolean)), kotlin.Function1((kotlin.Any, )))/transform">transform</span><span class="symbol">:</span>&nbsp;<span class="symbol">(</span><span class="symbol">(</span><span class="keyword">dynamic</span><span class="symbol">)</span>&nbsp;<span class="symbol">-&gt;</span>&nbsp;<span class="keyword">dynamic</span><span class="symbol">)</span><span class="symbol">?</span>&nbsp;<span class="symbol">=</span>&nbsp;null<span class="symbol">)</span><span class="symbol">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.js/-promise/index.html"><span class="identifier">Promise</span></a><span class="symbol">&lt;</span><a href="../-response/index.html"><span class="identifier">Response</span></a><span class="symbol">&lt;</span><a href="request.html#T"><span class="identifier">T</span></a><span class="symbol">&gt;</span><span class="symbol">&gt;</span></code>
<p>Helper inline function to automatically get serializer for the data.</p>
<h3>Parameters</h3>
<p><a name="url"></a>
<code>url</code> - an URL address</p>
<p><a name="data"></a>
<code>data</code> - data to be sent</p>
<p><a name="deserializer"></a>
<code>deserializer</code> - a deserializer for the result value</p>
<p><a name="method"></a>
<code>method</code> - a HTTP method</p>
<p><a name="contentType"></a>
<code>contentType</code> - a content type of the request</p>
<p><a name="beforeSend"></a>
<code>beforeSend</code> - a content type of the request</p>
<p><a name="transform"></a>
<code>transform</code> - a function to transform the result of the call</p>
<p><strong>Return</strong><br/>
a promise of the response</p>
<a name="pl.treksoft.kvision.rest.RestClient$request(kotlin.String, kotlinx.serialization.SerializationStrategy((pl.treksoft.kvision.rest.RestClient.request.V)), pl.treksoft.kvision.rest.RestClient.request.V, pl.treksoft.kvision.rest.HttpMethod, kotlin.String, kotlin.Function2((pl.treksoft.jquery.JQueryXHR, pl.treksoft.jquery.JQueryAjaxSettings, kotlin.Boolean)), kotlin.Function1((kotlin.Any, )))"></a>
<code><span class="keyword">inline</span> <span class="keyword">fun </span><span class="symbol">&lt;</span><span class="keyword">reified</span>&nbsp;<span class="identifier">T</span>&nbsp;<span class="symbol">:</span>&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html"><span class="identifier">Any</span></a><span class="symbol">, </span><span class="identifier">V</span>&nbsp;<span class="symbol">:</span>&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html"><span class="identifier">Any</span></a><span class="symbol">&gt;</span> <span class="identifier">request</span><span class="symbol">(</span><span class="identifier" id="pl.treksoft.kvision.rest.RestClient$request(kotlin.String, kotlinx.serialization.SerializationStrategy((pl.treksoft.kvision.rest.RestClient.request.V)), pl.treksoft.kvision.rest.RestClient.request.V, pl.treksoft.kvision.rest.HttpMethod, kotlin.String, kotlin.Function2((pl.treksoft.jquery.JQueryXHR, pl.treksoft.jquery.JQueryAjaxSettings, kotlin.Boolean)), kotlin.Function1((kotlin.Any, )))/url">url</span><span class="symbol">:</span>&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html"><span class="identifier">String</span></a><span class="symbol">, </span><span class="identifier" id="pl.treksoft.kvision.rest.RestClient$request(kotlin.String, kotlinx.serialization.SerializationStrategy((pl.treksoft.kvision.rest.RestClient.request.V)), pl.treksoft.kvision.rest.RestClient.request.V, pl.treksoft.kvision.rest.HttpMethod, kotlin.String, kotlin.Function2((pl.treksoft.jquery.JQueryXHR, pl.treksoft.jquery.JQueryAjaxSettings, kotlin.Boolean)), kotlin.Function1((kotlin.Any, )))/serializer">serializer</span><span class="symbol">:</span>&nbsp;<span class="identifier">SerializationStrategy</span><span class="symbol">&lt;</span><a href="request.html#V"><span class="identifier">V</span></a><span class="symbol">&gt;</span><span class="symbol">, </span><span class="identifier" id="pl.treksoft.kvision.rest.RestClient$request(kotlin.String, kotlinx.serialization.SerializationStrategy((pl.treksoft.kvision.rest.RestClient.request.V)), pl.treksoft.kvision.rest.RestClient.request.V, pl.treksoft.kvision.rest.HttpMethod, kotlin.String, kotlin.Function2((pl.treksoft.jquery.JQueryXHR, pl.treksoft.jquery.JQueryAjaxSettings, kotlin.Boolean)), kotlin.Function1((kotlin.Any, )))/data">data</span><span class="symbol">:</span>&nbsp;<a href="request.html#V"><span class="identifier">V</span></a><span class="symbol">, </span><span class="identifier" id="pl.treksoft.kvision.rest.RestClient$request(kotlin.String, kotlinx.serialization.SerializationStrategy((pl.treksoft.kvision.rest.RestClient.request.V)), pl.treksoft.kvision.rest.RestClient.request.V, pl.treksoft.kvision.rest.HttpMethod, kotlin.String, kotlin.Function2((pl.treksoft.jquery.JQueryXHR, pl.treksoft.jquery.JQueryAjaxSettings, kotlin.Boolean)), kotlin.Function1((kotlin.Any, )))/method">method</span><span class="symbol">:</span>&nbsp;<a href="../-http-method/index.html"><span class="identifier">HttpMethod</span></a>&nbsp;<span class="symbol">=</span>&nbsp;HttpMethod.GET<span class="symbol">, </span><span class="identifier" id="pl.treksoft.kvision.rest.RestClient$request(kotlin.String, kotlinx.serialization.SerializationStrategy((pl.treksoft.kvision.rest.RestClient.request.V)), pl.treksoft.kvision.rest.RestClient.request.V, pl.treksoft.kvision.rest.HttpMethod, kotlin.String, kotlin.Function2((pl.treksoft.jquery.JQueryXHR, pl.treksoft.jquery.JQueryAjaxSettings, kotlin.Boolean)), kotlin.Function1((kotlin.Any, )))/contentType">contentType</span><span class="symbol">:</span>&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html"><span class="identifier">String</span></a>&nbsp;<span class="symbol">=</span>&nbsp;"application/json"<span class="symbol">, </span><span class="keyword">noinline</span> <span class="identifier" id="pl.treksoft.kvision.rest.RestClient$request(kotlin.String, kotlinx.serialization.SerializationStrategy((pl.treksoft.kvision.rest.RestClient.request.V)), pl.treksoft.kvision.rest.RestClient.request.V, pl.treksoft.kvision.rest.HttpMethod, kotlin.String, kotlin.Function2((pl.treksoft.jquery.JQueryXHR, pl.treksoft.jquery.JQueryAjaxSettings, kotlin.Boolean)), kotlin.Function1((kotlin.Any, )))/beforeSend">beforeSend</span><span class="symbol">:</span>&nbsp;<span class="symbol">(</span><span class="symbol">(</span><span class="identifier">JQueryXHR</span><span class="symbol">,</span>&nbsp;<span class="identifier">JQueryAjaxSettings</span><span class="symbol">)</span>&nbsp;<span class="symbol">-&gt;</span>&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html"><span class="identifier">Boolean</span></a><span class="symbol">)</span><span class="symbol">?</span>&nbsp;<span class="symbol">=</span>&nbsp;null<span class="symbol">, </span><span class="keyword">noinline</span> <span class="identifier" id="pl.treksoft.kvision.rest.RestClient$request(kotlin.String, kotlinx.serialization.SerializationStrategy((pl.treksoft.kvision.rest.RestClient.request.V)), pl.treksoft.kvision.rest.RestClient.request.V, pl.treksoft.kvision.rest.HttpMethod, kotlin.String, kotlin.Function2((pl.treksoft.jquery.JQueryXHR, pl.treksoft.jquery.JQueryAjaxSettings, kotlin.Boolean)), kotlin.Function1((kotlin.Any, )))/transform">transform</span><span class="symbol">:</span>&nbsp;<span class="symbol">(</span><span class="symbol">(</span><span class="keyword">dynamic</span><span class="symbol">)</span>&nbsp;<span class="symbol">-&gt;</span>&nbsp;<span class="keyword">dynamic</span><span class="symbol">)</span><span class="symbol">?</span>&nbsp;<span class="symbol">=</span>&nbsp;null<span class="symbol">)</span><span class="symbol">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.js/-promise/index.html"><span class="identifier">Promise</span></a><span class="symbol">&lt;</span><a href="../-response/index.html"><span class="identifier">Response</span></a><span class="symbol">&lt;</span><a href="request.html#T"><span class="identifier">T</span></a><span class="symbol">&gt;</span><span class="symbol">&gt;</span></code>
<p>Helper inline function to automatically deserializer for the result value with typed data.</p>
<h3>Parameters</h3>
<p><a name="url"></a>
<code>url</code> - an URL address</p>
<p><a name="serializer"></a>
<code>serializer</code> - for the data</p>
<p><a name="data"></a>
<code>data</code> - data to be sent</p>
<p><a name="method"></a>
<code>method</code> - a HTTP method</p>
<p><a name="contentType"></a>
<code>contentType</code> - a content type of the request</p>
<p><a name="beforeSend"></a>
<code>beforeSend</code> - a content type of the request</p>
<p><a name="transform"></a>
<code>transform</code> - a function to transform the result of the call</p>
<p><strong>Return</strong><br/>
a promise of the response</p>
<a name="pl.treksoft.kvision.rest.RestClient$request(kotlin.String, pl.treksoft.kvision.rest.RestClient.request.V, pl.treksoft.kvision.rest.HttpMethod, kotlin.String, kotlin.Function2((pl.treksoft.jquery.JQueryXHR, pl.treksoft.jquery.JQueryAjaxSettings, kotlin.Boolean)), kotlin.Function1((kotlin.Any, )))"></a>
<code><span class="keyword">inline</span> <span class="keyword">fun </span><span class="symbol">&lt;</span><span class="keyword">reified</span>&nbsp;<span class="identifier">T</span>&nbsp;<span class="symbol">:</span>&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html"><span class="identifier">Any</span></a><span class="symbol">, </span><span class="keyword">reified</span>&nbsp;<span class="identifier">V</span>&nbsp;<span class="symbol">:</span>&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html"><span class="identifier">Any</span></a><span class="symbol">&gt;</span> <span class="identifier">request</span><span class="symbol">(</span><span class="identifier" id="pl.treksoft.kvision.rest.RestClient$request(kotlin.String, pl.treksoft.kvision.rest.RestClient.request.V, pl.treksoft.kvision.rest.HttpMethod, kotlin.String, kotlin.Function2((pl.treksoft.jquery.JQueryXHR, pl.treksoft.jquery.JQueryAjaxSettings, kotlin.Boolean)), kotlin.Function1((kotlin.Any, )))/url">url</span><span class="symbol">:</span>&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html"><span class="identifier">String</span></a><span class="symbol">, </span><span class="identifier" id="pl.treksoft.kvision.rest.RestClient$request(kotlin.String, pl.treksoft.kvision.rest.RestClient.request.V, pl.treksoft.kvision.rest.HttpMethod, kotlin.String, kotlin.Function2((pl.treksoft.jquery.JQueryXHR, pl.treksoft.jquery.JQueryAjaxSettings, kotlin.Boolean)), kotlin.Function1((kotlin.Any, )))/data">data</span><span class="symbol">:</span>&nbsp;<a href="request.html#V"><span class="identifier">V</span></a><span class="symbol">, </span><span class="identifier" id="pl.treksoft.kvision.rest.RestClient$request(kotlin.String, pl.treksoft.kvision.rest.RestClient.request.V, pl.treksoft.kvision.rest.HttpMethod, kotlin.String, kotlin.Function2((pl.treksoft.jquery.JQueryXHR, pl.treksoft.jquery.JQueryAjaxSettings, kotlin.Boolean)), kotlin.Function1((kotlin.Any, )))/method">method</span><span class="symbol">:</span>&nbsp;<a href="../-http-method/index.html"><span class="identifier">HttpMethod</span></a>&nbsp;<span class="symbol">=</span>&nbsp;HttpMethod.GET<span class="symbol">, </span><span class="identifier" id="pl.treksoft.kvision.rest.RestClient$request(kotlin.String, pl.treksoft.kvision.rest.RestClient.request.V, pl.treksoft.kvision.rest.HttpMethod, kotlin.String, kotlin.Function2((pl.treksoft.jquery.JQueryXHR, pl.treksoft.jquery.JQueryAjaxSettings, kotlin.Boolean)), kotlin.Function1((kotlin.Any, )))/contentType">contentType</span><span class="symbol">:</span>&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html"><span class="identifier">String</span></a>&nbsp;<span class="symbol">=</span>&nbsp;"application/json"<span class="symbol">, </span><span class="keyword">noinline</span> <span class="identifier" id="pl.treksoft.kvision.rest.RestClient$request(kotlin.String, pl.treksoft.kvision.rest.RestClient.request.V, pl.treksoft.kvision.rest.HttpMethod, kotlin.String, kotlin.Function2((pl.treksoft.jquery.JQueryXHR, pl.treksoft.jquery.JQueryAjaxSettings, kotlin.Boolean)), kotlin.Function1((kotlin.Any, )))/beforeSend">beforeSend</span><span class="symbol">:</span>&nbsp;<span class="symbol">(</span><span class="symbol">(</span><span class="identifier">JQueryXHR</span><span class="symbol">,</span>&nbsp;<span class="identifier">JQueryAjaxSettings</span><span class="symbol">)</span>&nbsp;<span class="symbol">-&gt;</span>&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html"><span class="identifier">Boolean</span></a><span class="symbol">)</span><span class="symbol">?</span>&nbsp;<span class="symbol">=</span>&nbsp;null<span class="symbol">, </span><span class="keyword">noinline</span> <span class="identifier" id="pl.treksoft.kvision.rest.RestClient$request(kotlin.String, pl.treksoft.kvision.rest.RestClient.request.V, pl.treksoft.kvision.rest.HttpMethod, kotlin.String, kotlin.Function2((pl.treksoft.jquery.JQueryXHR, pl.treksoft.jquery.JQueryAjaxSettings, kotlin.Boolean)), kotlin.Function1((kotlin.Any, )))/transform">transform</span><span class="symbol">:</span>&nbsp;<span class="symbol">(</span><span class="symbol">(</span><span class="keyword">dynamic</span><span class="symbol">)</span>&nbsp;<span class="symbol">-&gt;</span>&nbsp;<span class="keyword">dynamic</span><span class="symbol">)</span><span class="symbol">?</span>&nbsp;<span class="symbol">=</span>&nbsp;null<span class="symbol">)</span><span class="symbol">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.js/-promise/index.html"><span class="identifier">Promise</span></a><span class="symbol">&lt;</span><a href="../-response/index.html"><span class="identifier">Response</span></a><span class="symbol">&lt;</span><a href="request.html#T"><span class="identifier">T</span></a><span class="symbol">&gt;</span><span class="symbol">&gt;</span></code>
<p>Helper inline function to automatically get serializer for the data and deserializer for the result value.</p>
<h3>Parameters</h3>
<p><a name="url"></a>
<code>url</code> - an URL address</p>
<p><a name="data"></a>
<code>data</code> - data to be sent</p>
<p><a name="method"></a>
<code>method</code> - a HTTP method</p>
<p><a name="contentType"></a>
<code>contentType</code> - a content type of the request</p>
<p><a name="beforeSend"></a>
<code>beforeSend</code> - a content type of the request</p>
<p><a name="transform"></a>
<code>transform</code> - a function to transform the result of the call</p>
<p><strong>Return</strong><br/>
a promise of the response</p>
</BODY>
</HTML>