Android Http Get getStringResponseData(HttpResponse httpResponse)

Here you can find the source of getStringResponseData(HttpResponse httpResponse)

Description

get String Response Data

Declaration

public static String getStringResponseData(HttpResponse httpResponse)
            throws ParseException, IOException 

Method Source Code

//package com.java2s;

import java.io.IOException;

import org.apache.http.HttpResponse;
import org.apache.http.util.EntityUtils;

import android.net.ParseException;

public class Main {
    public static String getStringResponseData(HttpResponse httpResponse)
            throws ParseException, IOException {
        if (httpResponse == null) {
            return "httpResponse is null!";
        } else if (httpResponse.getEntity() == null) {
            return "httpResponse entity is null";
        } else {/*w  w w  .  j  ava 2s. c o  m*/
            return EntityUtils.toString(httpResponse.getEntity(), "UTF-8");
        }
    }
}

Related

  1. handleURLEncodedResponse(HttpResponse response)
  2. handleXMLResponse(HttpResponse response)
  3. getStringFromConnection( HttpURLConnection connection)
  4. httpGetRequestParseParams( String paramString)
  5. formatHttpHeaders(Map headers)
  6. getHttpClient()
  7. maybeCreateHttpClient()
  8. sendGetRequest(String path)
  9. fetchData(String url)