Interface IHttpRequest

public interface IHttpRequest
Represents an HTTP request message to be send to a server.
  • Method Details

    • getUri

      String getUri()
      Returns the request URI.
      the request URI
    • getMethod

      String getMethod()
      Returns the request HTTP Method.
      the request HTTP Method
    • getAllHeaders

      HttpHeader[] getAllHeaders()
      Returns all the headers of this message.
      all the headers of this message
    • setHeaders

      void setHeaders(HttpHeader[] headers)
      Overwrites all the headers in the message.
      headers - the array of headers to set
    • getContent

      Optional<InputStream> getContent()
      Returns a content stream of the entity.
      the content, or empty if not set
    • setContent

      void setContent(InputStream newContent, long length)
      Overwrites the content steam in the entity. When calling this method, make sure that you also set the 'Content-Length' header to the correct value.
      newContent - the new content
      length - the length of the new content or -1 if unknown