i must do i request with Volley Framework. This is a POST request with JSONObject.
I must pass one string and one JSONArray..but how i can?
I start with this:
private String mUrl;
private ArrayList<String> mUrlDove;
HashMap<String, String> params = new HashMap<String, String>();
params.put("url", mUrl);
params.put("urlDove", mUrlDove); ---> Wrong because mUrlDove is not a String
mUrl = app.getInstance().getmUrlRestWS() + getString(R.string.path);
JsonObjectRequest mRequest = new JsonObjectRequest(
mUrl, new JSONObject(params),
createMyReqSuccessListener(),
createMyReqErrorListener()) {
@Override
public Map<String, String> getHeaders() throws AuthFailureError {
return app.getInstance().createBasicAuthHeader();
}
};
If i try with Browser i must set this:
{
"url": "www.secret.com",
"urlDove" : [ "www.google.com","www.yahoo.com"]
}