Official Content

Returns all the HTML body in a File.

Syntax

&VarBasedOnExtendedDataType.ToFile(FileName)

Where:

FileName
     It is the path to the file.

Scope

Extended Data Types: HttpClient, HttpRequest
Generators: .NET, Java, Ruby (up to GeneXus X Evolution 3), Visual FoxPro (up to GeneXus X Evolution 3)

Samples

HttpClient:

&httpclient.execute("GET","/servlet/clients")
&httpclient.ToFile(“c:\htmls\clients.html”)

It returns the HTML code of the webpanel clients in the clients.html file.

HttpRequest:

&httprequest.ToFile(“c:\files\clients.json”)

In a main procedure with call protocol HTTP, it saves a file received by a webservice call.

Security tips

Do not use user's inputs concatenations or sanitize the user's entries to avoid path traversal or path manipulation vulnerability risks.

See Also

HttpClient Data Type
HttpRequest Data Type
Execute method






Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant