@@ -0,0 +1,2675 @@
+package com.example.gertu;%0A%0Aimport java.io.IOException;%0Aimport java.io.UnsupportedEncodingException;%0Aimport java.util.List;%0A %0Aimport org.apache.http.HttpEntity;%0Aimport org.apache.http.HttpResponse;%0Aimport org.apache.http.NameValuePair;%0Aimport org.apache.http.client.ClientProtocolException;%0Aimport org.apache.http.client.entity.UrlEncodedFormEntity;%0Aimport org.apache.http.client.methods.HttpGet;%0Aimport org.apache.http.client.methods.HttpPost;%0Aimport org.apache.http.client.utils.URLEncodedUtils;%0Aimport org.apache.http.impl.client.DefaultHttpClient;%0Aimport org.apache.http.util.EntityUtils;%0A %0Apublic class ServiceHandler %7B%0A %0A    static String response = null;%0A    public final static int GET = 1;%0A    public final static int POST = 2;%0A %0A    public ServiceHandler() %7B%0A %0A    %7D%0A %0A    /**%0A     * Making service call%0A     * @url - url to make request%0A     * @method - http request method%0A     * */%0A    public String makeServiceCall(String url, int method) %7B%0A        return this.makeServiceCall(url, method, null);%0A    %7D%0A %0A    /**%0A     * Making service call%0A     * @url - url to make request%0A     * @method - http request method%0A     * @params - http request params%0A     * */%0A    public String makeServiceCall(String url, int method,%0A            List%3CNameValuePair%3E params) %7B%0A        try %7B%0A            // http client%0A            DefaultHttpClient httpClient = new DefaultHttpClient();%0A            HttpEntity httpEntity = null;%0A            HttpResponse httpResponse = null;%0A             %0A            // Checking http request method type%0A            if (method == POST) %7B%0A                HttpPost httpPost = new HttpPost(url);%0A                // adding post params%0A                if (params != null) %7B%0A                    httpPost.setEntity(new UrlEncodedFormEntity(params));%0A                %7D%0A %0A                httpResponse = httpClient.execute(httpPost);%0A %0A            %7D else if (method == GET) %7B%0A                // appending params to url%0A                if (params != null) %7B%0A                    String paramString = URLEncodedUtils%0A                            .format(params, %22utf-8%22);%0A                    url += %22?%22 + paramString;%0A                %7D%0A                HttpGet httpGet = new HttpGet(url);%0A %0A                httpResponse = httpClient.execute(httpGet);%0A %0A            %7D%0A            httpEntity = httpResponse.getEntity();%0A            response = EntityUtils.toString(httpEntity);%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         %0A        return response;%0A %0A    %7D%0A%7D%0A

For the http requests