UrlUtility
UrlUtility
UrlUtility
Metadata
appendURLParams()
takes address and appends (and possibly replaces existing, if same param)
the given params
Arguments
Name |
Type |
Required |
Default |
Options |
Description |
address |
string |
Yes |
|
|
address to append params to |
paramStruct |
struct |
Yes |
|
|
params to append |
replaceExisting |
boolean |
No |
true |
|
indicates to replace existing keys if they already exist in the address |
getURLParamStruct()
takes an address with possible url params (?param=value¶m2=value...) and returns
a struct with param names as keys and param values as the key values.
Arguments
Name |
Type |
Required |
Default |
Options |
Description |
address |
string |
Yes |
|
|
address to get url struct from (must have the leading ? somewhere) |
replaceURLParams()
takes and address with possible url params and returns the base address
with the given set of params in the paramStruct.
Arguments
Name |
Type |
Required |
Default |
Options |
Description |
address |
string |
Yes |
|
|
address to replace params on |
paramStruct |
struct |
Yes |
|
|
structure with params to put in the address |
structToURLParams()
converts struct into url parameter list, separated with ampersands, including
leading question mark.
Arguments
Name |
Type |
Required |
Default |
Options |
Description |
urlVars |
struct |
Yes |
|
|
struct to convert to URL parameters. |