How do I construct and pass raw json data with okHttpClient in android
问题 I am using a query where I need to POST to an endpoint with okhttpclient. The issue is I have the payload value and the senttime. I just don't know how to create a json object to send over as a raw body object to the endpoint. To make things more clear: here's my postman screenshot: enter image description here This is my post request : https://example.org/api/service-profile/v1/device-notification/ {deviceId} Now I am planning to pass {deviceId} in the path, authorization token in the header