I am trying to do a POST request using Volley, below is the kind of request i'd like to make, a header and a JSON body
I've tried using Unirest api (Unirest.io) but it requires min sdk as 24, so i had to switch to Volley
HttpResponse<String> response = Unirest.post("https://api.msg91.com/api/v2/sendsms?country=91")
.header("authkey", "")
.header("content-type", "application/json")
.body("{ \"sender\": \"SOCKET\", \"route\": \"4\", \"country\": \"91\", \"sms\": [ { \"message\": \"Message1\", \"to\": [ \"98260XXXXX\", \"98261XXXXX\" ] }, { \"message\": \"Message2\", \"to\": [ \"98260XXXXX\", \"98261XXXXX\" ] } ] }")
.asString();