Class HttpRequestUniBody

    • Constructor Detail

    • Method Detail

      • body

        public RequestBodyEntity body​(java.io.InputStream inputStreamBody)
        Description copied from interface: RequestBodyEntity
        Set a InputStream as the body
        Specified by:
        body in interface RequestBodyEntity
        Parameters:
        inputStreamBody - the Object
        Returns:
        this request builder
      • body

        public RequestBodyEntity body​(java.lang.Object objectBody)
        Description copied from interface: RequestBodyEntity
        Set a Object as the body of the request. This will be serialized with one of the following methods: - Strings are native - JSONElements use their native toString - Everything else will pass through the supplied ObjectMapper
        Specified by:
        body in interface RequestBodyEntity
        Parameters:
        objectBody - the Object
        Returns:
        this request builder
      • body

        public RequestBodyEntity body​(java.lang.String bodyAsString)
        Description copied from interface: RequestBodyEntity
        Set a String as the body of the request
        Specified by:
        body in interface RequestBodyEntity
        Parameters:
        bodyAsString - the String
        Returns:
        this request builder
      • body

        public RequestBodyEntity body​(byte[] bodyBytes)
        Description copied from interface: RequestBodyEntity
        Set a byte array as the body of the request
        Specified by:
        body in interface RequestBodyEntity
        Parameters:
        bodyBytes - the byte[]
        Returns:
        this request builder
      • charset

        public RequestBodyEntity charset​(java.nio.charset.Charset charset)
        Description copied from interface: RequestBodyEntity
        Set the Charset encoding for the Content-Type. This is appended to the Content-Type Header (e.g. application/x-www-form-urlencoded; charset=US-ASCII) Default is UTF-8
        Specified by:
        charset in interface RequestBodyEntity
        Parameters:
        charset - the charset
        Returns:
        this request builder
      • getCharset

        public java.nio.charset.Charset getCharset()
        Specified by:
        getCharset in interface Body
      • isMultiPart

        public boolean isMultiPart()
        Specified by:
        isMultiPart in interface Body
      • isEntityBody

        public boolean isEntityBody()
        Specified by:
        isEntityBody in interface Body