Class Headers
java.lang.Object
kong.unirest.core.Headers
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidAdd a header elementvoidAdd a header element with a supplier which will be evaluated on requestvoidall()Get all of the headersvoidclear()Clear the headers!booleancontainsKey(String name) Check if a header is presentvoidcookie(Collection<Cookie> cookies) voidbooleanGet all the values for a header nameGet the first header value for a nameinthashCode()private booleanvoidAdd a bunch of headers at oncevoidRemove a header by name(package private) voidvoidReplace a header value.voidReplace all headers from a given map.voidsetBasicAuth(String username, String password) intsize()Get the number of header keys.toString()
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
headers
-
-
Constructor Details
-
Headers
public Headers() -
Headers
-
-
Method Details
-
add
-
add
-
replace
-
remove
-
size
public int size()Get the number of header keys.- Returns:
- the size of the header keys
-
get
-
putAll
-
containsKey
Check if a header is present- Parameters:
name- a header- Returns:
- if the headers contain this name.
-
clear
public void clear()Clear the headers! -
getFirst
-
all
-
isName
-
remove
-
toString
-
cookie
-
cookie
-
equals
-
hashCode
-
setBasicAuth
-
accepts
-
add
-
replace
-