Interface HttpRequest<R extends HttpRequest<R>>

All Known Subinterfaces:
HttpPost

public interface HttpRequest<R extends HttpRequest<R>>
Represents an HTTP message.
Author:
Holger Eichelberger, SSE
  • Method Summary

    Modifier and Type
    Method
    Description
    setEntity(String entity)
    Associates the entity with this request.
    setHeader(String name, String value)
    Overwrites the first header with the same name.
  • Method Details

    • setEntity

      R setEntity(String entity) throws IOException
      Associates the entity with this request.
      Parameters:
      entity - the entity to send
      Returns:
      this for chaining
      Throws:
      IOException - if the entity cannot be encoded
    • setHeader

      R setHeader(String name, String value)
      Overwrites the first header with the same name. The new header will be appended to the end of the list, if no header with the given name can be found.
      Parameters:
      name - the name of the header
      value - the value of the header
      Returns:
      this for chaining