getHeaders ( string url , array[string] _data , string _referer , bool[default:true] _allowsRedirect ) : string
Return the headers of a request. Ex :
header1=value1;header2=value2;
header1=value1;header2=value2;
Note: the result is a string and not a map because you can have sevral same keys.
Example
// Define the URL and form data
url = "https://www.example.com/login"
formData = ["username" :"user", "password" : "pass"]
referer = "https://www.example.com"
// Get the headers from the request
headers = getHeaders(url, formData, referer, true)
// Display the retrieved headers
console(headers)
Parameters
url
URL of the page, or the page of the form (ex: form for login)
_data (optional)
associative array of string with the content of the form
_referer (optional)
referer header. It is the origin page indicated.
_allowsRedirect (optional)
Allows redirections (301, 302, etc.).