@@ -0,0 +1,1641 @@
+package com.gertu.mobile;%0A%0Aimport org.apache.http.HttpEntity;%0Aimport org.apache.http.HttpResponse;%0Aimport org.apache.http.client.ClientProtocolException;%0Aimport org.apache.http.client.methods.HttpPost;%0Aimport org.apache.http.entity.StringEntity;%0Aimport org.apache.http.impl.client.DefaultHttpClient;%0Aimport org.apache.http.util.EntityUtils;%0A%0Aimport java.io.IOException;%0Aimport java.io.UnsupportedEncodingException;%0A%0Apublic class ServiceHandlerJson %7B%0A%0A%0A    static String response = %22%22;%0A    public final static int POST = 2;%0A%0A    public ServiceHandlerJson() %7B%0A%0A    %7D%0A%0A    public String makeServiceCall(String url, int method,%0A                                  StringEntity jsonParams) %7B%0A        try %7B%0A            DefaultHttpClient httpClient = new DefaultHttpClient();%0A            HttpEntity httpEntity;%0A            HttpResponse httpResponse = null;%0A%0A            HttpPost httpPost = new HttpPost(url);%0A            if (jsonParams != null) %7B%0A                httpPost.setEntity(jsonParams);%0A                httpPost.setHeader(%22Accept%22, %22application/json%22);%0A                httpPost.setHeader(%22Content-type%22, %22application/json%22);%0A            %7D%0A%0A            httpResponse = httpClient.execute(httpPost);%0A%0A            if (httpResponse != null) %7B%0A                httpEntity = httpResponse.getEntity();%0A                response = EntityUtils.toString(httpEntity);%0A            %7D%0A%0A        %7D catch (UnsupportedEncodingException e) %7B%0A            e.printStackTrace();%0A        %7D catch (ClientProtocolException e) %7B%0A            e.printStackTrace();%0A        %7D catch (IOException e) %7B%0A            e.printStackTrace();%0A        %7D%0A        return response;%0A    %7D%0A%7D%0A

Example to use the ServiceHandlerJson documentation of the API: docs.gertuapi.apiary.io String jsonStr; ServiceHandlerJson shj = new ServiceHandlerJson(); JSONObject jO = new JSONObject(); try { jO.put("name", "Jesus"); jO.put("email", "jesus@mail.com"); jO.put("password", "123456"); } catch (JSONException e){ e.printStackTrace(); } StringEntity se = null; try { se = new StringEntity(jO.toString()); } catch (UnsupportedEncodingException e) { e.printStackTrace(); } jsonStr = shj.makeServiceCall("http://gertuapi.apiary.io/mobile/v1/users",ServiceHandlerJson.POST, se);