HttpParams
An HTTP request/response body that represents serialized parameters,
per the MIME type application/x-www-form-urlencoded
.
class HttpParams {
constructor(options: HttpParamsOptions = {} as HttpParamsOptions)
has(param: string): boolean
get(param: string): string | null
getAll(param: string): string[] | null
keys(): string[]
append(param: string, value: string): HttpParams
set(param: string, value: string): HttpParams
delete(param: string, value?: string): HttpParams
toString(): string
}
Description
This class is immutable - all mutation operations return a new instance.
Constructor
Methods
Check whether the body has one or more values for the given parameter name. |
Get the first value for the given parameter name, or |
Get all values for the given parameter name, or |
Get all the parameter names for this body. |
Construct a new body with an appended value for the given parameter name. |
Construct a new body with a new value for the given parameter name. |
Construct a new body with either the given value for the given parameter removed, if a value is given, or all values for the given parameter removed if not. |
||||||
Parameters
Returns |
Serialize the body to an encoded string, where key-value pairs (separated by |
ParametersThere are no parameters. Returns
|