From eb623b7d9c4ccf392d450038f2bb0a6560074ae5 Mon Sep 17 00:00:00 2001 From: Cedric Beust Date: Wed, 28 Oct 2015 21:02:03 -0700 Subject: [PATCH] Warnings. --- .../kotlin/com/beust/kobalt/maven/Http.kt | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/main/kotlin/com/beust/kobalt/maven/Http.kt b/src/main/kotlin/com/beust/kobalt/maven/Http.kt index df9a80aa..a39537a9 100644 --- a/src/main/kotlin/com/beust/kobalt/maven/Http.kt +++ b/src/main/kotlin/com/beust/kobalt/maven/Http.kt @@ -29,7 +29,7 @@ public class Http { val response = client.newCall(request.build()).execute() return Body(response.body(), response.code()) } catch(ex: IOException) { - throw KobaltException("Could not load URL ${url}, error: " + ex.message, ex) + throw KobaltException("Could not load URL $url, error: " + ex.message, ex) } } @@ -64,16 +64,16 @@ public class Http { } } - private val JSON = MediaType.parse("application/json; charset=utf-8") - - fun post(user: String?, password: String?, url: String, payload: String) : String { - val request = builder(user, password) - .url(url) - .post(RequestBody.create(JSON, payload)) - .build() - val response = OkHttpClient().newCall(request).execute() - return response.body().string() - } +// private val JSON = MediaType.parse("application/json; charset=utf-8") +// +// fun post(user: String?, password: String?, url: String, payload: String) : String { +// val request = builder(user, password) +// .url(url) +// .post(RequestBody.create(JSON, payload)) +// .build() +// val response = OkHttpClient().newCall(request).execute() +// return response.body().string() +// } } class KobaltException(s: String? = null, ex: Throwable? = null) : RuntimeException(s, ex) {