Fixed putJson actually posting Json.

This commit is contained in:
Clinton Alexander 2016-11-04 16:23:56 +00:00
parent 5ac679dd0e
commit 9fcdf70b33

View File

@ -18,7 +18,7 @@ object HttpUtils {
fun putJson(url: URL, data: String) : Boolean {
val body = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), data)
return makeRequest(Request.Builder().url(url).header("Content-Type", "application/json").post(body).build())
return makeRequest(Request.Builder().url(url).header("Content-Type", "application/json").put(body).build())
}
fun postJson(url: URL, data: String) : Boolean {