* 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>;
})
| 236 | * @return A new body with the new value. |
| 237 | */ |
| 238 | appendAll(params: { |
| 239 | [param: string]: string | number | boolean | ReadonlyArray<string | number | boolean>; |
| 240 | }): HttpParams { |
| 241 | const updates: Update[] = []; |
| 242 | Object.keys(params).forEach((param) => { |
| 243 | const value = params[param]; |
| 244 | if (Array.isArray(value)) { |
| 245 | value.forEach((_value) => { |
| 246 | updates.push({param, value: _value, op: 'a'}); |
| 247 | }); |
| 248 | } else { |
| 249 | updates.push({param, value: value as string | number | boolean, op: 'a'}); |
| 250 | } |
| 251 | }); |
| 252 | return this.clone(updates); |
| 253 | } |
| 254 | |
| 255 | /** |
| 256 | * Replaces the value for a parameter. |