I am trying to use HTTPURLConnection make a POST method call to a server api. The JSON version of the body of my call is:
{
"grant_type" : "password",
"username" : "perry.marange@zmod.co",
"password" : "password"
}
How do I add this part using httpURLConnection?
i think you can use the Android Rest-Client for sending data to a webservice
take classes
RequestMethod.java
andRestClient.java
from this link https://github.com/TylerSmithNet/RESTclient-Android/tree/master/RESTclient-example/src/com/tylersmith/restclientand use those in your project like this