readFile Function

Top  Previous  Next

 

Syntax

Net.readFile(URL, file [, stringData [, headers]])

Arguments

URLA string with the URL.
fileAn instance File object in which receive data will be written.
stringDataA string with data to send by the "POST" method.
headersAdditional headers to include in the HTTP request.

Return Value

If successful, the integer zero; otherwise, an integer error code.

Remarks

If stringData is not present (or null or undefined), the "GET" method will used; otherwise the "POST" method is used.

Examples

 

See Also