Adds file contents to a data buffer that is going to be sent.
&HttpClientOrHttpResponseVbleName.AddFile(Path,[Name])
Where:
&HttpClientOrHttpResponseVbleName: Variable name based on an HttpClient or an HttpResponse data type.
Path: String containing the file's path.
Name (Optional): String containing the name of the variable with which the server waits for the file.
In particular, if the content of the HttpClient message is multipart / form-data (given by Content-Type Header), then the AddFile method adds the file as multipart. In this case, the second parameter is needed to indicate the name of the variable that the file represents. Also, you have to necessarily precede your sentence with a header that specifies a specific Content-Type, like this:
&Httpclient.Addheader("Content-Type", !"multipart/form-data")
The AddFile method supports a Multipart message, since GeneXus 15 Upgrade 6.
HttpClient data type
HttpResponse data type