Making a head request
AndroidNetworking.head("https://fierce-cove-29863.herokuapp.com/getAllUsers/{pageNumber}")
.addPathParameter("pageNumber", "0")
.addQueryParameter("limit", "3")
.build()
.getAsOkHttpResponse(new OkHttpResponseListener() {
@Override
public void onResponse(Response response) {
// do anything with response
if (response.isSuccessful()) {
Log.d(TAG, "Headers :" + response.headers());
}
}
@Override
public void onError(ANError anError) {
// handle error
}
});