Cleanup unused func
This commit is contained in:
1 parent
8eec363581
commit
969c9a66af
1 file changed
-2
@@ -41,8 +41,6 @@ val MEDIA_TYPE_JSON: MediaType = "application/json; charset=utf-8".toMediaType()
|
||||
|
||||
inline fun JSONObject.array(name: String, builder: JSONArray.() -> Unit): JSONObject = put(name, JSONArray().apply(builder))
|
||||
|
||||
inline fun JSONArray.array(builder: JSONArray.() -> Unit): JSONArray = put(JSONArray().apply(builder))
|
||||
|
||||
fun jsonArrayOf(vararg element: Any?) = JSONArray().apply { element.forEach { put(it) } } // Should ensure it is inlined
|
||||
|
||||
inline fun Request.Builder.jsonBody(builder: JSONObject.() -> Unit) = post(JSONObject().apply(builder).toString().toRequestBody(MEDIA_TYPE_JSON))
|
||||
|
||||
Reference in new issue
Block a user