runJSONPostRequest

Same as {doJSONPostRequest} but this returns a {{HttpResponse}} instead.

Return

a JSONObject created by parsing the HTTP response, or null if the response is empty

Parameters

uri

the request URI

Throws

org.json.JSONException

open fun runJSONPostRequest(uri: URI, headers: Map<String, String>): HttpResponse

Same as {doJSONPostRequest} but this returns a {{HttpResponse}} instead.

Return

a JSONObject created by parsing the HTTP response, or null if the response is empty

Parameters

uri

the request URI

headers

the request headers

Throws

org.json.JSONException

open fun runJSONPostRequest(uri: URI, headers: Map<String, String>, requestBody: String): HttpResponse