Class POSTBuilder
- All Implemented Interfaces:
Serializable
,Cloneable
,Map<String,
,String> SequencedMap<String,
String>
A helper class to build POST bodies.
- Since:
- 3.4
- Version:
- 9.2
- Author:
- Luke
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,
V>, AbstractMap.SimpleImmutableEntry<K, V> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addIfPresent
(String key, String value) Adds a value to the Map provided it is not null or empty.byte[]
Builds a POST body of name/value pairs.Methods inherited from class java.util.LinkedHashMap
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, newLinkedHashMap, putFirst, putLast, removeEldestEntry, replaceAll, reversed, sequencedEntrySet, sequencedKeySet, sequencedValues, values
Methods inherited from class java.util.HashMap
clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, newHashMap, put, putAll, putIfAbsent, remove, remove, replace, replace, size
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size
Methods inherited from interface java.util.SequencedMap
firstEntry, lastEntry, pollFirstEntry, pollLastEntry
-
Constructor Details
-
POSTBuilder
POSTBuilder()
-
-
Method Details
-
addIfPresent
-
getBody
Builds a POST body of name/value pairs.- Parameters:
c
- the Charset to encode with- Returns:
- the POST body
-