toggle menu
APIManager
2.2.4
jvm
switch theme
search in API
APIManager
/
com.tecknobit.apimanager.apis
/
APIRequest
/
Headers
Headers
open
class
Headers
The
Headers
class is useful to assemble headers values for the request
Members
Constructors
Headers
Link copied to clipboard
constructor
(
)
Constructor to init
Headers
No-any params required
constructor
(
mergeHeaders
:
APIRequest.Headers
)
Constructor to init
Headers
Properties
headers
Link copied to clipboard
private
val
headers
:
HashMap
<
String
,
String
>
headers
is the instance that contains headers value
Functions
add
Header
Link copied to clipboard
open
fun
<
T
>
addHeader
(
headerKey
:
String
,
headerValue
:
T
)
Method to add a new header value
clear
Link copied to clipboard
open
fun
clear
(
)
Method to clear all headers No-any params required
get
All
Headers
Link copied to clipboard
open
fun
getAllHeaders
(
)
:
Collection
<
String
>
Method to get all headers value No-any params required
get
Header
Link copied to clipboard
open
fun
getHeader
(
headerKey
:
String
)
:
String
Method to get a header value
get
Headers
Keys
Link copied to clipboard
open
fun
getHeadersKeys
(
)
:
Set
<
String
>
Method to get all headers keys No-any params required
merge
Headers
Link copied to clipboard
open
fun
mergeHeaders
(
mergeHeaders
:
APIRequest.Headers
)
Method to merge another headers value in the same object
remove
Header
Link copied to clipboard
open
fun
removeHeader
(
headerKey
:
String
)
Method to remove a header
to
String
Link copied to clipboard
open
fun
toString
(
)
:
String
Returns a string representation of the object No-any params required