Request SetMessageBodyFromFile Method C# API
Sets the body of the HTTP request that will be sent to the server, by loading data from a data file.

Namespace: Facilita.Web
Assembly: clrWebBrowser (in clrWebBrowser.dll) Version: (

public void SetMessageBodyFromFile(
	string fileName


Type: System String
The path of the filename, relative to the Virtual User's data directory.

This method is normally used with a POST or PUT request.

Note 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.


The following example demonstrates setting the message body of a POST request from the contents of a file.
Url url32 = new Url(protocol1, localhost, "/uploadFile");
Request request32 = Browser.CreateRequest(HttpMethod.POST, url32, 32);
Response response32 = request32.Send();
See Also