com.baidu.sapi2.http
类 SyncHttpClient
java.lang.Object
com.baidu.sapi2.http.AsyncHttpClient
com.baidu.sapi2.http.SyncHttpClient
public abstract class SyncHttpClient
- extends AsyncHttpClient
方法摘要 |
String |
delete(String url)
|
String |
delete(String url,
RequestParams params)
|
void |
delete(String url,
RequestParams queryParams,
AsyncHttpResponseHandler responseHandler)
|
String |
get(String url)
|
String |
get(String url,
RequestParams params)
|
int |
getResponseCode()
|
abstract String |
onRequestFailed(Throwable error,
String content)
|
String |
post(String url)
|
String |
post(String url,
RequestParams params)
|
String |
put(String url)
|
String |
put(String url,
RequestParams params)
|
protected void |
sendRequest(org.apache.http.impl.client.DefaultHttpClient client,
org.apache.http.protocol.HttpContext httpContext,
org.apache.http.client.methods.HttpUriRequest uriRequest,
String contentType,
AsyncHttpResponseHandler responseHandler,
android.content.Context context)
|
从类 com.baidu.sapi2.http.AsyncHttpClient 继承的方法 |
addHeader, cancelRequests, delete, delete, delete, get, get, get, get, get, getHttpClient, getHttpContext, getUrlWithQueryString, post, post, post, post, post, post, put, put, put, put, put, setBasicAuth, setBasicAuth, setCookieStore, setSSLSocketFactory, setThreadPool, setTimeout, setUserAgent |
从类 java.lang.Object 继承的方法 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SyncHttpClient
public SyncHttpClient()
getResponseCode
public int getResponseCode()
- 返回:
- the response code for the last request, might be usefull
sometimes
sendRequest
protected void sendRequest(org.apache.http.impl.client.DefaultHttpClient client,
org.apache.http.protocol.HttpContext httpContext,
org.apache.http.client.methods.HttpUriRequest uriRequest,
String contentType,
AsyncHttpResponseHandler responseHandler,
android.content.Context context)
- 覆盖:
- 类
AsyncHttpClient
中的 sendRequest
onRequestFailed
public abstract String onRequestFailed(Throwable error,
String content)
delete
public void delete(String url,
RequestParams queryParams,
AsyncHttpResponseHandler responseHandler)
get
public String get(String url,
RequestParams params)
get
public String get(String url)
put
public String put(String url,
RequestParams params)
put
public String put(String url)
post
public String post(String url,
RequestParams params)
post
public String post(String url)
delete
public String delete(String url,
RequestParams params)
delete
public String delete(String url)
Copyright © 2013. All Rights Reserved.