Package com.azure.android.core.util
Class Header
- java.lang.Object
-
- com.azure.android.core.util.Header
-
public class Header extends java.lang.Object
Represents a single header to be set on a request.If multiple header values are added to a request with the same name (case-insensitive), then the values will be appended at the end of the same
Header
with commas separating them.
-
-
Constructor Summary
Constructors Constructor Description Header(java.lang.String name, java.lang.String value)
Create a Header instance using the provided name and value.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addValue(java.lang.String value)
Add a new value to the end of the Header.java.lang.String
getName()
Gets the header name.java.lang.String
getValue()
Gets the value of thisHeader
.java.lang.String[]
getValues()
Gets the comma separated value as an array.java.lang.String
toString()
Gets the String representation of the header.
-
-
-
Method Detail
-
getName
public java.lang.String getName()
Gets the header name.- Returns:
- the name of this
Header
-
getValue
public java.lang.String getValue()
Gets the value of thisHeader
.- Returns:
- the value of this Header
-
getValues
public java.lang.String[] getValues()
Gets the comma separated value as an array.- Returns:
- the values of this
Header
that are separated by a comma
-
addValue
public void addValue(java.lang.String value)
Add a new value to the end of the Header.- Parameters:
value
- the value to add
-
toString
public java.lang.String toString()
Gets the String representation of the header.- Overrides:
toString
in classjava.lang.Object
- Returns:
- the String representation of this Header.
-
-