You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to post data using ".jsonBody" but every time it tries to POST it returns a Body: null. Am I formatting the json incorrectly? Any suggestions?
var intHR = heartRateBpm.value.toInt()
data class tobesent(
var devID: String,
var currentDB: Float,
var currentHr: Int,
var userLatitude: Float,
var userLongitude: Float,
)
val send = tobesent("Andy",0f,intHR,0f,0f)
Fuel.post("https://smart-sense-dashboard.herokuapp.com/api/sensors/")
.header(Headers.AUTHORIZATION, "4a16b669-43bc-412a-8dad-18dc7fb199d9")
.jsonBody(Gson().toJson(send).toString())
.responseString()
.also { println(it) }
The text was updated successfully, but these errors were encountered:
I am trying to post data using ".jsonBody" but every time it tries to POST it returns a Body: null. Am I formatting the json incorrectly? Any suggestions?
The text was updated successfully, but these errors were encountered: