Q:

How to send a JSONArray in a POST Request in Kotlin?

I need to send an Array of JSONObjects from my Android App to an API. I've not found a way to do this with libraries such as khttp and Fuel other than looping over all objects and sending them one by one which I think is very inefficient. 
So my question is, how can I send an entire JSONArray in a POST request?

A:

You can call toString() on the JSONArray, which turns it into a Json string and set the body of your post request to that string, although I'm not sure of the specific requirements of the khttp and Fuel libraries.
JSONArray docs

