withURIParam()function
withURIParam(uri: ImmutableURL | URLString, key: string, value: unknown, caller?: AnyCaller): ImmutableURL
withURIParam(uri: PossibleURI, key: string, value: unknown, caller?: AnyCaller): ImmutableURI
| Param | Type | |
|---|---|---|
uri | ImmutableURLURLString | required |
key | string | required |
value | unknown | 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 |
| 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 the value could not be converted to a string. |
Return a URI with a new param set (or same URI if no changes were made).
- Any params with
undefinedvalue will be ignored.