Last active
August 29, 2015 13:58
-
-
Save px-amaac/9998933 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void findMaid(String httpRequestExtension) { | |
PassRestClient.get(httpRequestExtension, null, | |
new JsonHttpResponseHandler() { | |
@Override | |
public void onSuccess(JSONObject response) { | |
new ParseMaid().execute(response); | |
} | |
}); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.loopj.android.http.AsyncHttpClient; | |
import com.loopj.android.http.AsyncHttpResponseHandler; | |
import com.loopj.android.http.RequestParams; | |
public class PassRestClient { | |
private static final String BASE_URL = "http://appdomum.com/services/parkingpass_11.php"; | |
private static AsyncHttpClient client = new AsyncHttpClient(); | |
public static void get(String url, RequestParams params, AsyncHttpResponseHandler responseHandler) { | |
client.get(getAbsoluteUrl(url), params, responseHandler); | |
} | |
public static void post(String url, RequestParams params, AsyncHttpResponseHandler responseHandler) { | |
client.post(getAbsoluteUrl(url), params, responseHandler); | |
} | |
public static String getAbsoluteUrl(String relativeUrl) { | |
return BASE_URL + relativeUrl; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment