Class Request


  • public class Request
    extends java.lang.Object
    • Field Detail

      • DATE_LOCALE

        public static final java.util.Locale DATE_LOCALE
      • TIME_ZONE

        public static final java.util.TimeZone TIME_ZONE
    • Method Detail

      • Get

        public static Request Get​(java.net.URI uri)
      • Get

        public static Request Get​(java.lang.String uri)
      • Head

        public static Request Head​(java.net.URI uri)
      • Head

        public static Request Head​(java.lang.String uri)
      • Post

        public static Request Post​(java.net.URI uri)
      • Post

        public static Request Post​(java.lang.String uri)
      • Patch

        public static Request Patch​(java.net.URI uri)
      • Patch

        public static Request Patch​(java.lang.String uri)
      • Put

        public static Request Put​(java.net.URI uri)
      • Put

        public static Request Put​(java.lang.String uri)
      • Trace

        public static Request Trace​(java.net.URI uri)
      • Trace

        public static Request Trace​(java.lang.String uri)
      • Delete

        public static Request Delete​(java.net.URI uri)
      • Delete

        public static Request Delete​(java.lang.String uri)
      • Options

        public static Request Options​(java.net.URI uri)
      • Options

        public static Request Options​(java.lang.String uri)
      • abort

        public void abort()
                   throws java.lang.UnsupportedOperationException
        Throws:
        java.lang.UnsupportedOperationException
      • setHeader

        public Request setHeader​(Header header)
        Since:
        4.3
      • addHeader

        public Request addHeader​(java.lang.String name,
                                 java.lang.String value)
      • setHeader

        public Request setHeader​(java.lang.String name,
                                 java.lang.String value)
        Since:
        4.3
      • removeHeaders

        public Request removeHeaders​(java.lang.String name)
      • setCacheControl

        public Request setCacheControl​(java.lang.String cacheControl)
      • setDate

        public Request setDate​(java.util.Date date)
      • setIfModifiedSince

        public Request setIfModifiedSince​(java.util.Date date)
      • setIfUnmodifiedSince

        public Request setIfUnmodifiedSince​(java.util.Date date)
      • config

        @Deprecated
        public Request config​(java.lang.String param,
                              java.lang.Object object)
        Deprecated.
        (4.3)
        This method has no effect. Do not use.
      • removeConfig

        @Deprecated
        public Request removeConfig​(java.lang.String param)
        Deprecated.
        (4.3)
        This method has no effect. Do not use.
      • elementCharset

        @Deprecated
        public Request elementCharset​(java.lang.String charset)
        Deprecated.
        (4.3)
        This parameter can no longer be used at the request level.

        This method has no effect. Do not use.

      • useExpectContinue

        public Request useExpectContinue()
      • userAgent

        public Request userAgent​(java.lang.String agent)
      • socketTimeout

        public Request socketTimeout​(int timeout)
      • connectTimeout

        public Request connectTimeout​(int timeout)
      • staleConnectionCheck

        @Deprecated
        public Request staleConnectionCheck​(boolean b)
        Deprecated.
        (4.4)
        This method has no effect. Do not use.
      • viaProxy

        public Request viaProxy​(java.lang.String proxy)
        Since:
        4.4
      • bodyForm

        public Request bodyForm​(java.lang.Iterable<? extends NameValuePair> formParams,
                                java.nio.charset.Charset charset)
      • bodyString

        public Request bodyString​(java.lang.String s,
                                  ContentType contentType)
      • bodyByteArray

        public Request bodyByteArray​(byte[] b)
      • bodyByteArray

        public Request bodyByteArray​(byte[] b,
                                     ContentType contentType)
        Since:
        4.4
      • bodyByteArray

        public Request bodyByteArray​(byte[] b,
                                     int off,
                                     int len)
      • bodyByteArray

        public Request bodyByteArray​(byte[] b,
                                     int off,
                                     int len,
                                     ContentType contentType)
        Since:
        4.4
      • bodyStream

        public Request bodyStream​(java.io.InputStream inStream)
      • bodyStream

        public Request bodyStream​(java.io.InputStream inStream,
                                  ContentType contentType)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object