Package com.ibm.cloud.sdk.core.http
Class Headers
- java.lang.Object
-
- com.ibm.cloud.sdk.core.http.Headers
-
public class Headers extends java.lang.Object
Wrapper class for the internal HTTP headers class.
-
-
Constructor Summary
Constructors Constructor Description Headers(okhttp3.Headers headers)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object other)
Returns true if other is a Headers object with the same headers, with the same casing, in the same order.int
hashCode()
java.util.Set<java.lang.String>
names()
Returns an immutable, case-insensitive set of header names.java.lang.String
toString()
java.util.List<java.lang.String>
values(java.lang.String name)
Returns an immutable list of the header values for the specified name.
-
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object other)
Returns true if other is a Headers object with the same headers, with the same casing, in the same order.- Overrides:
equals
in classjava.lang.Object
- Parameters:
other
- the other object to compare- Returns:
- whether the two objects are equal or not
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
names
public java.util.Set<java.lang.String> names()
Returns an immutable, case-insensitive set of header names.- Returns:
- the list of header names
-
values
public java.util.List<java.lang.String> values(java.lang.String name)
Returns an immutable list of the header values for the specified name.- Parameters:
name
- the name of the specified header- Returns:
- the values associated with the name
-
-