* Constructs a new body with appended values for the given parameter name. * @param params parameters and values * @return A new body with the new value.
(params: {
[param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>;
})
| 250 | * @return A new body with the new value. |
| 251 | */ |
| 252 | appendAll(params: { |
| 253 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>; |
| 254 | }): HttpParams { |
| 255 | const updates: Update[] = []; |
| 256 | Object.keys(params).forEach((param) => { |
| 257 | const value = params[param]; |
| 258 | if (Array.isArray(value)) { |
| 259 | value.forEach((_value) => { |
| 260 | updates.push({param, value: _value, op: 'a'}); |
| 261 | }); |
| 262 | } else { |
| 263 | updates.push({param, value: value as string | number | boolean, op: 'a'}); |
| 264 | } |
| 265 | }); |
| 266 | return this.clone(updates); |
| 267 | } |
| 268 | |
| 269 | /** |
| 270 | * Replaces the value for a parameter. |