Methods to manage URLS
Members
string
# static EscapedChars
The list of escaped characters in URLs
Properties:
Name | Type | Description |
---|---|---|
"%" |
string
|
|
" " |
string
|
|
"#" |
string
|
|
$ |
string
|
|
"&" |
string
|
|
"@" |
string
|
|
"`" |
string
|
|
"/" |
string
|
|
":" |
string
|
|
":" |
string
|
|
"<" |
string
|
|
"=" |
string
|
|
">" |
string
|
|
"?" |
string
|
|
"[" |
string
|
|
"\" |
string
|
|
"]" |
string
|
|
"^" |
string
|
|
"{" |
string
|
|
"|" |
string
|
|
"}" |
string
|
|
"~" |
string
|
|
"\"" |
string
|
|
"‘" |
string
|
|
"+" |
string
|
|
"," |
string
|
Methods
# static buildGET(host, subfoldersopt, argsArrayopt, httpVersionopt) → {string}
Builds a HTTP GET request. The user-agent is named after DuESF.scriptName.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
host |
string
|
The host, without port, without http part; for example: "duduf.com" or "version.rxlab.io" | ||
subfolders |
Array.<string>
|
<optional> |
The subfolders. | |
argsArray |
Object
|
<optional> |
An associative array with key/value pairs. Values will be escaped. | |
httpVersion |
string
|
<optional> |
"1.1" | An associative array with key/value pairs. Values will be escaped. |
The query ready to be posted with a socket
string
# static buildRequest(arr) → {string}
Builds a query, made of "key=value" pairs.
Parameters:
Name | Type | Description |
---|---|---|
arr |
Object
|
An associative array with key/value pairs. Values will be escaped. |
The query, with the leading ?.
string
# static escape(str) → {string}
Escapes common characters from a string to be included in a GET request URL.
Parameters:
Name | Type | Description |
---|---|---|
str |
string
|
The string to escape. |
The escaped string.
string