http

http

  • @static

Constructor

http(url, inputopt, methodopt) → {string}

Description:
  • Performs a HTTP request and returns response.

    • This function is accessible via the aidesys:: prefix.
    • It is not available in the cygwin environment.
Parameters:
Name Type Attributes Default Description
url string

The HTTP URL.

input string <optional>
""

The URL query or content:

  • GET method, noy used, the quety is directly appended to the URL prefixed with a '?' char and separated with '&' chars.
  • POST method, the URL query, a string of the form name_1=value_1&name_2=value_2, which will be URL encoded.
  • PUT method, the URL put content, usually using a JSON string.
method string <optional>
"GET"

Either GET, POST or PUT, i.e. the HTTP method.

Returns:

The response value, or en error message if any.

Type
string