This is the code that I am trying to do but it doesn't work.
val JSON = String.format("application/json; charset=utf-8").toMediaType()
(headers as Map<String, String>).toHeaders()
I did import: import okhttp3.MediaType
What do I need to do to make it recognise the toMediaType and toHeaders methods?
String.format
? It seems unnecessary – Roundtreeval JSON : String
and the other, wasn't aware I need to import the companion, but now I know – Exploiter