Download a file in a multipart response
This example demonstrates how to return a file in a form-data type HTTP multipart response while also transferring data of other types in the same message response.
Example multipart response
In this example an integer is returned in the header and a string and a text file as multipart in the body.PUBLIC FUNCTION help2()
ATTRIBUTES (WSGet,
WSPath="/help2")
RETURNS (INTEGER ATTRIBUTE(WSHeader),
STRING,
TEXT ATTRIBUTE(WSName="txt_file") )
DEFINE t TEXT
CALL t.readFile("mytext.txt")
RETURN 3, "hello world", t
END FUNCTION