Home | History | Annotate | Download | only in util

Lines Matching defs:string

35     private static final String TAG = "QSB.JavaNetHttpHelper";
39 private static final String USER_AGENT_HEADER = "User-Agent";
40 private static final String DEFAULT_CHARSET = "UTF-8";
44 private final String mUserAgent;
51 * @param userAgent User agent string, e.g. "MyApp/1.0".
53 public JavaNetHttpHelper(UrlRewriter rewriter, String userAgent) {
62 * @return The response content. This is the empty string if the response
67 public String get(GetRequest request) throws IOException, HttpException {
76 * @return The response content. This is the empty string if the response
81 public String get(String url, Map<String,String> requestHeaders)
97 public String post(PostRequest request) throws IOException, HttpException {
101 public String post(String url, Map<String,String> requestHeaders, String content)
106 requestHeaders = new HashMap<String, String>();
127 private HttpURLConnection createConnection(String url, Map<String, String> headers)
133 for (Map.Entry<String,String> e : headers.entrySet()) {
134 String name = e.getKey();
135 String value = e.getValue();
150 private String getResponseFrom(HttpURLConnection c) throws IOException, HttpException {
160 StringBuilder string = new StringBuilder();
164 string.append(chars, 0, bytes);
166 return string.toString();
183 public String rewrite(String url) {