GetURL

Gets the text of the server's response to the specified address.

Syntax

function GetURL(aURL:string):string; overload;
function GetURL(aURL:string; var aHeaders: array of string):string; overload;

Parameters

  • aURL
    • type: string
    • functions: address where the request is sent
  • aHeaders
    • type: array of string
    • functions: request/response headers

Returned value

  • type: string
  • functions: server response

Examples

  1. var source := GetURL('https://wordpress.com');
  2. //{$MODE PASCAL}
    var hdrs : array of string = [];
    GetURL('https://wordpress.com', hdrs);
    for var i := 0 to hdrs.length - 1 do
      Log(hdrs[i]);