Class POSTBuilder

All Implemented Interfaces:
Serializable, Cloneable, Map<String,String>, SequencedMap<String,String>

class POSTBuilder extends LinkedHashMap<String,String>
A helper class to build POST bodies.
Since:
3.4
Version:
9.2
Author:
Luke
  • Constructor Details

    • POSTBuilder

      POSTBuilder()
  • Method Details

    • addIfPresent

      public void addIfPresent(String key, String value)
      Adds a value to the Map provided it is not null or empty.
      Parameters:
      key - the key
      value - the value
    • getBody

      public byte[] getBody(Charset c)
      Builds a POST body of name/value pairs.
      Parameters:
      c - the Charset to encode with
      Returns:
      the POST body