Class RequestHeaders

java.lang.Object
org.azd.abstractions.RequestHeaders

public class RequestHeaders extends Object
Container class to set the request headers.
  • Constructor Details

    • RequestHeaders

      public RequestHeaders()
  • Method Details

    • add

      public void add(CustomHeader customHeader)
      Adds a custom header.
      Parameters:
      customHeader - Custom header to add CustomHeader.
    • add

      public void add(RequestHeaders requestHeaders)
      Adds a new request header object.
      Parameters:
      requestHeaders - Request headers to add.
    • remove

      public void remove(CustomHeader customHeader)
      Removes the custom header value.
      Parameters:
      customHeader - Custom header to remove.
    • replace

      public void replace(CustomHeader customHeader)
      Replaces the custom header value with the given value.
      Parameters:
      customHeader - Custom header to replace.
    • clear

      public void clear()
      Clears the headers.
    • add

      public void add(String name, String value)
      Adds the header name and value.
      Parameters:
      name - Header name to add.
      value - Header value to add.
    • remove

      public void remove(String name)
      Remove the header name.
      Parameters:
      name - Header name to remove.
    • replace

      public void replace(String name, String value)
      Replace a header value.
      Parameters:
      name - Header name.
      value - Header value to replace.
    • getHeaders

      public HashMap<String,String> getHeaders()
      Get the headers.
      Returns:
      Map of headers.
    • isEmpty

      public boolean isEmpty()
      Check if the header map os empty.
      Returns:
      True if the map is empty.