Sets the body of the HTTP request that will be sent to the server, by loading data
from a data file.
Namespace: Facilita.WebAssembly: clrWebBrowser (in clrWebBrowser.dll) Version: 9.5.7.98 (1.0.0.0)
Syntax
Parameters
- fileName
- Type: System String
The path of the filename, relative to the Virtual User's data directory.
Remarks
- If the message body is a Form, then you should use the SetMessageBody(Form) overload instead.
- If the message body is a short section of text or a few binary bytes, consider using the SetMessageBody(String) or SetMessageBody( Byte ) overloads.
Note |
---|
If you are using this method in your script, make sure that the file containing the data is in the data/Files directory within your project. |
Examples
Url url32 = new Url(protocol1, localhost, "/uploadFile"); Request request32 = Browser.CreateRequest(HttpMethod.POST, url32, 32); request32.SetMessageBodyFromFile("myDoc.doc"); Response response32 = request32.Send();
See Also