Back to project page nemo.
The source code is released under:
Apache License
If you think the Android project nemo listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.networking.nemo.example; //from w w w. java 2 s . c om import com.networking.nemo.network.NetworkRequestListener; import com.networking.nemo.request.ValidatingJsonNetworkRequest; public class ValidatingUserRequest extends ValidatingJsonNetworkRequest<User, ValidatingNetworkRequestError> { public ValidatingUserRequest(int method, String url, Object jsonBody, Class<User> classOfSuccessfulObject, Class<ValidatingNetworkRequestError> classOfFailedObject, NetworkRequestListener<User, ValidatingNetworkRequestError> listener) { super(method, url, jsonBody, classOfSuccessfulObject, classOfFailedObject, listener); } @Override public boolean isValid(ValidatingNetworkRequestError error) { return error.getStatus().equals("0"); // Only response with json status // 0 are valid } @Override public boolean getShouldCache() { return false; } }