withURIParams()function
withURIParams(uri: ImmutableURL | URLString, params: Nullish<PossibleURIParams>, caller?: AnyCaller): ImmutableURL
withURIParams(uri: PossibleURI, params: Nullish<PossibleURIParams>, caller?: AnyCaller): ImmutableURI
| Param | Type | |
|---|---|---|
uri | ImmutableURLURLString | required |
params | Nullish<PossibleURIParams> | A set of possible URI params. - If params is null or undefined the same input URL will be returned. required |
caller | AnyCaller | Any calling function or constructor, usually referring to something that can call in the current scope that can appear in a stack trace. |
uri | PossibleURI | Values that can be converted to an ImmutableURI instance. required |
params | Nullish<PossibleURIParams> | Nullish is the value or null or undefined. required |
| Return | |
|---|---|
ImmutableURL | Object that describes a valid URL, e.g. example.com/path/to/resource |
ImmutableURI | Object that describes a valid URI, e.g. or example.com/path/to/resource |
| Throws | |
|---|---|
unknown | ValueError if any of the values could not be converted to strings. |
Return a URI with several new params set (or same URI if no changes were made).
- Any params with
undefinedvalue will be ignored.