@@ -0,0 +1,2117 @@
+/**%0A * A HTTP plugin for Cordova / Phonegap%0A */%0Apackage com.synconset;%0A%0Aimport java.net.UnknownHostException;%0Aimport java.util.Map;%0A%0Aimport org.apache.cordova.CallbackContext;%0Aimport org.json.JSONException;%0Aimport org.json.JSONObject;%0A%0Aimport javax.net.ssl.SSLHandshakeException;%0A%0Aimport android.util.Log;%0A%0Aimport com.github.kevinsawicki.http.HttpRequest;%0Aimport com.github.kevinsawicki.http.HttpRequest.HttpRequestException;%0A %0Apublic class CordovaHttpPostJson extends CordovaHttp implements Runnable %7B%0A    %0A    public CordovaHttpPostJson(String urlString, JSONObject jsonObj, Map%3CString, String%3E headers, CallbackContext callbackContext) %7B%0A        super(urlString, jsonObj, headers, callbackContext);%0A    %7D%0A    %0A    @Override%0A    public void run() %7B%0A        try %7B%0A            HttpRequest request = HttpRequest.post(this.getUrlString());%0A            this.setupSecurity(request);%0A            request.headers(this.getHeaders());%0A            request.acceptJson();%0A            request.contentType(HttpRequest.CONTENT_TYPE_JSON);%0A            request.send(getJsonObject().toString());%0A            int code = request.code();%0A            String body = request.body(CHARSET);%0A            JSONObject response = new JSONObject();%0A            response.put(%22status%22, code);%0A            if (code %3E= 200 && code %3C 300) %7B%0A                response.put(%22data%22, body);%0A                this.getCallbackContext().success(response);%0A            %7D else %7B%0A                response.put(%22error%22, body);%0A                this.getCallbackContext().error(response);%0A            %7D%0A        %7D catch (JSONException e) %7B%0A            this.respondWithError(%22There was an error generating the response%22);%0A        %7D  catch (HttpRequestException e) %7B%0A            if (e.getCause() instanceof UnknownHostException) %7B%0A                this.respondWithError(0, %22The host could not be resolved%22);%0A            %7D else if (e.getCause() instanceof SSLHandshakeException) %7B%0A                this.respondWithError(%22SSL handshake failed%22);%0A            %7D else %7B%0A                this.respondWithError(%22There was an error with the request%22);%0A            %7D%0A        %7D%0A    %7D%0A%7D%0A

Create CordovaHttpPostJson.java