Headers

open class Headers

The Headers class is useful to assemble headers values for the request

Constructors

Link copied to clipboard
constructor()
Constructor to init Headers No-any params required
constructor(mergeHeaders: APIRequest.Headers)
Constructor to init Headers

Properties

Link copied to clipboard
private val headers: HashMap<String, String>
headers is the instance that contains headers value

Functions

Link copied to clipboard
open fun <T> addHeader(headerKey: String, headerValue: T)
Method to add a new header value
Link copied to clipboard
open fun clear()
Method to clear all headers No-any params required
Link copied to clipboard
Method to get all headers value No-any params required
Link copied to clipboard
open fun getHeader(headerKey: String): String
Method to get a header value
Link copied to clipboard
Method to get all headers keys No-any params required
Link copied to clipboard
open fun mergeHeaders(mergeHeaders: APIRequest.Headers)
Method to merge another headers value in the same object
Link copied to clipboard
open fun removeHeader(headerKey: String)
Method to remove a header
Link copied to clipboard
open fun toString(): String
Returns a string representation of the object No-any params required