you can write the extends Request class. (override getHeaders () and so on) exactly the same as
public abstract class AbsRequest<T> extends Request<T>{
public AbsRequest(int method, String url, Response.ErrorListener listener) {
this(method, url, null, listener);
}
public AbsRequest(int method, String url, Map<String, String> params, Response.ErrorListener listener) {
this(method, url, params, null, listener);
}
public AbsRequest(int method, String url, Map<String, String> params, Map<String, String> head, Response.ErrorListener listener) {
this(method, url, params, head, null, listener);
}
public AbsRequest(int method, String url, Map<String, String> params, Map<String, String> head, String bodyContentType, Response.ErrorListener listener) {
this(method, url, params, null, head, bodyContentType, listener);
}
public AbsRequest(int method, String url, String body, Map<String, String> head, String bodyContentType, Response.ErrorListener listener) {
this(method, url, null, body, head, bodyContentType, listener);
}
private AbsRequest(int method, String url, Map<String, String> params, String body, Map<String, String> head, String bodyContentType, Response.ErrorListener listener) {
super(method, url, listener);
}
}
for more information you can see https://github.com/Caij/CodeHub/blob/master/lib/src/main/java/com/caij/lib/volley/request/AbsRequest.java
how to use you can see https: //github.com/Caij/CodeHub/tree/master/app/src/main/java/com/caij/codehub/presenter/imp