Class 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.
    • Method Detail

      • getPath

        public String getPath()
      • getHeaderParams

        public com.google.common.collect.Multimap<String,​String> getHeaderParams()
      • 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()
      • urlEncode

        public static String urlEncode​(String value)