Package com.microsoft.kiota
Class Headers
java.lang.Object
com.microsoft.kiota.CaseInsensitiveMap
com.microsoft.kiota.Headers
- Direct Known Subclasses:
RequestHeaders,ResponseHeaders
A class representing the headers of a request or a response.
-
Nested Class Summary
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.microsoft.kiota.CaseInsensitiveMap
clear, containsKey, containsValue, entrySet, get, isEmpty, keySet, normalizeKey, put, putAll, remove, size, valuesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
Headers
protected Headers()Default constructor -
Headers
Copy constructor- Parameters:
headers- The headers to initialize with.
-
-
Method Details
-
add
Adds a header to the current request.- Parameters:
key- the key of the header to add.value- the value of the header to add.
-
tryAdd
Adds a header to the current request if it was not already set- Parameters:
key- the key of the header to add.value- the value of the header to add.- Returns:
- if the value have been added
-
remove
Removes a value from a header- Parameters:
key- the key of the header to remove the value fromvalue- the value to remove- Returns:
- true if the value was removed, false otherwise
-