public class Client extends Object
Client is a typical wrapper of RPC. Also see
com.qiniu.api.auth.DigestAuthClient| 构造器和说明 |
|---|
Client() |
| 限定符和类型 | 方法和说明 |
|---|---|
CallRet |
call(String url)
Sends a http post request to the specified url.
|
CallRet |
call(String url,
List<org.apache.http.NameValuePair> nvps)
Sends a http post request to the specified url with a list of
NameValuePair |
CallRet |
callWithBinary(String url,
org.apache.http.entity.AbstractHttpEntity entity)
Sends a http request to the specified url with the specified entity.
|
CallRet |
callWithBinary(String url,
String contentType,
byte[] body) |
CallRet |
callWithMultiPart(String url,
org.apache.http.entity.mime.MultipartEntity requestEntity) |
void |
setAuth(org.apache.http.client.methods.HttpPost post) |
public void setAuth(org.apache.http.client.methods.HttpPost post)
throws AuthException
post - AuthExceptionpublic CallRet call(String url)
url - the request urlpublic CallRet call(String url, List<org.apache.http.NameValuePair> nvps)
NameValuePair.url - the request urlnvps - public CallRet callWithBinary(String url, org.apache.http.entity.AbstractHttpEntity entity)
url - entity - public CallRet callWithBinary(String url, String contentType, byte[] body)
url - the request urlcontentType - the request content typebody - the request bodybodyLength - the length of the request bodyCopyright © 2014. All Rights Reserved.