Package com.mashape.unirest.request
Class BaseRequest
- java.lang.Object
-
- com.mashape.unirest.request.BaseRequest
-
- Direct Known Subclasses:
HttpRequest,MultipartBody,RawBody,RequestBodyEntity
public abstract class BaseRequest extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected HttpRequesthttpRequestprotected static StringUTF_8
-
Constructor Summary
Constructors Modifier Constructor Description protectedBaseRequest()protectedBaseRequest(HttpRequest httpRequest)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HttpResponse<InputStream>asBinary()Future<HttpResponse<InputStream>>asBinaryAsync()Future<HttpResponse<InputStream>>asBinaryAsync(Callback<InputStream> callback)HttpResponse<String>asString()Future<HttpResponse<String>>asStringAsync()Future<HttpResponse<String>>asStringAsync(Callback<String> callback)HttpRequestgetHttpRequest()
-
-
-
Field Detail
-
UTF_8
protected static final String UTF_8
- See Also:
- Constant Field Values
-
httpRequest
protected HttpRequest httpRequest
-
-
Constructor Detail
-
BaseRequest
protected BaseRequest(HttpRequest httpRequest)
-
BaseRequest
protected BaseRequest()
-
-
Method Detail
-
getHttpRequest
public HttpRequest getHttpRequest()
-
asString
public HttpResponse<String> asString() throws UnirestException
- Throws:
UnirestException
-
asStringAsync
public Future<HttpResponse<String>> asStringAsync()
-
asStringAsync
public Future<HttpResponse<String>> asStringAsync(Callback<String> callback)
-
asBinary
public HttpResponse<InputStream> asBinary() throws UnirestException
- Throws:
UnirestException
-
asBinaryAsync
public Future<HttpResponse<InputStream>> asBinaryAsync()
-
asBinaryAsync
public Future<HttpResponse<InputStream>> asBinaryAsync(Callback<InputStream> callback)
-
-