aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Jaros <rjaros@finn.pl>2020-05-16 01:22:21 +0200
committerRobert Jaros <rjaros@finn.pl>2020-05-16 01:22:21 +0200
commit90a6caea41700447a040c500f8cdff0c564224e5 (patch)
tree9e4336cc976bdc27e7c1d0aea8c7cd1713f41e24
parentd270d087dab24175949a819b2ab2037d31c28b6b (diff)
downloadkvision-90a6caea41700447a040c500f8cdff0c564224e5.tar.gz
kvision-90a6caea41700447a040c500f8cdff0c564224e5.tar.bz2
kvision-90a6caea41700447a040c500f8cdff0c564224e5.zip
Fix warnings
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/rest/RestClient.kt16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/rest/RestClient.kt b/src/main/kotlin/pl/treksoft/kvision/rest/RestClient.kt
index e55249cc..b50be0f3 100644
--- a/src/main/kotlin/pl/treksoft/kvision/rest/RestClient.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/rest/RestClient.kt
@@ -132,8 +132,8 @@ open class RestClient {
contentType: String = "application/json",
beforeSend: ((JQueryXHR, JQueryAjaxSettings) -> Boolean)? = null
): Promise<dynamic> {
- val data = if (method == HttpMethod.GET) data.toObj(serializer) else JSON.plain.stringify(serializer, data)
- return remoteCall(url, data, method, contentType, beforeSend)
+ val dataSer = if (method == HttpMethod.GET) data.toObj(serializer) else JSON.plain.stringify(serializer, data)
+ return remoteCall(url, dataSer, method, contentType, beforeSend)
}
@@ -159,10 +159,10 @@ open class RestClient {
beforeSend: ((JQueryXHR, JQueryAjaxSettings) -> Boolean)? = null,
transform: ((dynamic) -> dynamic)? = null
): Promise<T> {
- val data = if (method == HttpMethod.GET) data.toObj(serializer) else JSON.plain.stringify(serializer, data)
+ val dataSer = if (method == HttpMethod.GET) data.toObj(serializer) else JSON.plain.stringify(serializer, data)
return remoteCall(
url,
- data,
+ dataSer,
method,
contentType,
beforeSend
@@ -422,8 +422,8 @@ open class RestClient {
contentType: String = "application/json",
beforeSend: ((JQueryXHR, JQueryAjaxSettings) -> Boolean)? = null
): Promise<Response<dynamic>> {
- val data = if (method == HttpMethod.GET) data.toObj(serializer) else JSON.plain.stringify(serializer, data)
- return remoteRequest(url, data, method, contentType, beforeSend)
+ val dataSer = if (method == HttpMethod.GET) data.toObj(serializer) else JSON.plain.stringify(serializer, data)
+ return remoteRequest(url, dataSer, method, contentType, beforeSend)
}
@@ -449,10 +449,10 @@ open class RestClient {
beforeSend: ((JQueryXHR, JQueryAjaxSettings) -> Boolean)? = null,
transform: ((dynamic) -> dynamic)? = null
): Promise<Response<T>> {
- val data = if (method == HttpMethod.GET) data.toObj(serializer) else JSON.plain.stringify(serializer, data)
+ val dataSer = if (method == HttpMethod.GET) data.toObj(serializer) else JSON.plain.stringify(serializer, data)
return remoteRequest(
url,
- data,
+ dataSer,
method,
contentType,
beforeSend