Package com.treasuredata.client
Class TDApiRequest
- java.lang.Object
-
- com.treasuredata.client.TDApiRequest
-
public class TDApiRequest extends Object
An abstraction of TD API request, which will be translated to Jetty's http client request. We need this abstraction to create multiple http request objects upon API call retry since Jetty's Request instances are not reusable.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TDApiRequest.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.google.common.base.Optional<byte[]>
getContent()
int
getContentLength()
int
getContentOffset()
com.google.common.base.Optional<Boolean>
getFollowRedirects()
com.google.common.collect.Multimap<String,String>
getHeaderParams()
TDHttpMethod
getMethod()
String
getPath()
com.google.common.base.Optional<String>
getPostJson()
com.google.common.base.Optional<File>
getPutFile()
Map<String,String>
getQueryParams()
static String
urlEncode(String value)
TDApiRequest
withUri(String uri)
-
-
-
Method Detail
-
withUri
public TDApiRequest withUri(String uri)
-
getPath
public String getPath()
-
getMethod
public TDHttpMethod getMethod()
-
getPostJson
public com.google.common.base.Optional<String> getPostJson()
-
getPutFile
public com.google.common.base.Optional<File> getPutFile()
-
getContent
public com.google.common.base.Optional<byte[]> getContent()
-
getContentOffset
public int getContentOffset()
-
getContentLength
public int getContentLength()
-
getFollowRedirects
public com.google.common.base.Optional<Boolean> getFollowRedirects()
-
-