Package com.azure.common.http
Class HttpHeader
- java.lang.Object
-
- com.azure.common.http.HttpHeader
-
public class HttpHeader extends Object
A single header within a HTTP request or response. If multiple header values are added to a HTTP request or response with the same name (case-insensitive), then the values will be appended to the end of the same Header with commas separating them.
-
-
Constructor Summary
Constructors Constructor Description HttpHeader(String name, String value)Create a HttpHeader instance using the provided name and value.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddValue(String value)Add a new value to the end of the Header.Stringname()Get the header name.StringtoString()Get the String representation of the header.Stringvalue()Get the header value.String[]values()Get the comma separated value as an array.
-
-
-
Method Detail
-
name
public String name()
Get the header name.- Returns:
- the name of this Header
-
value
public String value()
Get the header value.- Returns:
- the value of this Header
-
values
public String[] values()
Get the comma separated value as an array.- Returns:
- the values of this Header that are separated by a comma
-
addValue
public void addValue(String value)
Add a new value to the end of the Header.- Parameters:
value- the value to add
-
-