I am new to Java and trying to make native android application which includes making HTTP Calls to API Server. Now My issue is that for making HTTP POST (apache httpPost and httpClient) call with some JSON data. So to make StringEntity out of JSONObject I am writing this line of code:
StringEntity userDataStringEntity = new StringEntity(userDataString);
Where StringEntity is imported from import org.apache.http.entity.StringEntity;
.
I have tried searching for this issue and I am finding same method with same "string" parameter.
Here are some links, but it didn't help me:
How to send a JSON object over HttpClient Request with Android?