Interface RequestBodyEntity

All Superinterfaces:
Body, HttpRequest<RequestBodyEntity>
All Known Implementing Classes:
HttpRequestUniBody

public interface RequestBodyEntity extends HttpRequest<RequestBodyEntity>, Body
  • Method Details

    • body

      RequestBodyEntity body(byte[] bodyBytes)
      Set a byte array as the body of the request
      Parameters:
      bodyBytes - the byte[]
      Returns:
      this request builder
    • body

      RequestBodyEntity body(String bodyAsString)
      Set a String as the body of the request
      Parameters:
      bodyAsString - the String
      Returns:
      this request builder
    • body

      RequestBodyEntity body(JsonNode jsonBody)
      Set JSON on the body
      Parameters:
      jsonBody - the JsonNode
      Returns:
      this request builder
    • body

      Set a InputStream as the body
      Parameters:
      body - the Object
      Returns:
      this request builder
    • body

      Set JSON on the body
      Parameters:
      body - the JSONElement
      Returns:
      this request builder
    • body

      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
      Parameters:
      body - the Object
      Returns:
      this request builder
    • charset

      RequestBodyEntity charset(Charset charset)
      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
      Parameters:
      charset - the charset
      Returns:
      this request builder
    • noCharset

      default RequestBodyEntity noCharset()
      Removes any Charset for the Content-Type for when servers cannot process it. (e.g. application/x-www-form-urlencoded)
      Returns:
      this request builder
    • contentType

      RequestBodyEntity contentType(String type)
      Parameters:
      type - The content mime type
      Returns:
      this request builder
    • uploadMonitor

      RequestBodyEntity uploadMonitor(ProgressMonitor monitor)
      Set a Progress upload monitor suitable for drawing progress bars and whatnot. Works With
      Parameters:
      monitor - a monitor
      Returns:
      The same MultipartBody