Android Open Source - WiFiSentry Rest Client






From Project

Back to project page WiFiSentry.

License

The source code is released under:

MIT License

If you think the Android project WiFiSentry listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package muntaserahmed.wifisentry;
/*from www.j ava 2  s.c om*/
import android.content.Context;
import android.util.Log;

import com.loopj.android.http.*;
import org.apache.http.HttpEntity;

public class RestClient {

    private static final String PROTOCOL = "http";
    private static final int PORT = 5000;

    private static AsyncHttpClient client = new AsyncHttpClient();

    public static void get(String url, RequestParams params, AsyncHttpResponseHandler responseHandler) {
        client.get(url, params, responseHandler);
    }

    public static void post(Context context, String host, String endpoint, HttpEntity entity,
                            String contentType, AsyncHttpResponseHandler responseHandler) {
        client.post(context, getAbsoluteUrl(host, endpoint), entity, contentType, responseHandler);
    }

    private static String getAbsoluteUrl(String host, String endpoint) {
        Log.d("URL: ", PROTOCOL + "://" + host + "/" + endpoint);
        return PROTOCOL + "://" + host + "/" + endpoint;
    }

}




Java Source Code List

muntaserahmed.wifisentry.ApplicationTest.java
muntaserahmed.wifisentry.CardboardOverlayView.java
muntaserahmed.wifisentry.CustomScanResult.java
muntaserahmed.wifisentry.DashboardActivity.java
muntaserahmed.wifisentry.RestClient.java
muntaserahmed.wifisentry.ServerActivity.java
muntaserahmed.wifisentry.SortLevel.java
muntaserahmed.wifisentry.VRActivity.java
muntaserahmed.wifisentry.WorldLayoutData.java