Could somebody show me any example how execute POST or GET request using volley library to server with certificate issued by a well known CA? Do I have to change anything co
This is how I am using it:
public Request> deleteUser(String id, final String loginName, final String password,
Response.Listener responseListener,
Response.ErrorListener errorListener) {
final int method = Request.Method.DELETE;
final Map authHeaders = getAuthHeaders(loginName, password);
StringRequest request = new StringRequest(method, url, responseListener, errorListener) {
@Override
public Map getHeaders() throws AuthFailureError {
return authHeaders;
}
};
return mQueue.add(request);
}
public Map getAuthHeaders(String loginName, String password) {
HashMap params = new HashMap();
String creds = String.format("%s:%s", loginName, password);
String auth = "Basic " + Base64.encodeToString(creds.getBytes(), Base64.DEFAULT);
params.put("Authorization", auth);
return params;
}