Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

WebView.PostURL

Navigates to a resource identified by a URL or to a file identified by a full path.

Component Version macOS Windows Linux Server iOS SDK
WebView 10.1 ✅ Yes ✅ Yes ❌ No ❌ No ✅ Yes
MBS( "WebView.PostURL"; WebViewerRef; URL { ; PostData; Headers } )   More

Parameters

Parameter Description Example Flags
WebViewerRef Either the Web Viewer Object Name or the Web Viewer ID as returned by "WebView.FindByName" function.
URL The URL, full path, or Universal Naming Convention (UNC) location and name of the resource to display. "http://monkeybreadsoftware.com/filemaker/echo.cgi"
PostData The data to post.
The post data that is sent to the server as part of a HTTP POST transaction. A POST transaction is typically used to send data gathered by an HTML form. If this parameter does not specify any post data, this method issues an HTTP GET transaction. This parameter is ignored if the URL is not an HTTP URL.
"<test>Hello World</test>" Optional
Headers The text list that contains additional HTTP headers to send to the server. These headers are added to the default headers. For example, headers can specify the action required of the server, the type of data being passed to the server, or a status code. This parameter is ignored if the URL is not an HTTP URL. "Test: MyHeader 123
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.4 Safari/605.1.15"
Optional

Result

Returns OK or error.

Description

Navigates to a resource identified by a URL or to a file identified by a full path.
This function is similar to WebView.LoadURL, but can pass additional headers or POST data.
For MacOS and iOS, please use WebView.SetCustomUserAgent to overwrite user agent.

Examples

Load URL in WebViewer by doing a POST with custom header to overwrite user agent:

MBS( "WebView.PostURL"; "web";
// URL
"https://www.monkeybreadsoftware.com/filemaker/echo.cgi";
// some POST data
"Hello World";
// and our custom headers
"Test: MyHeader 123¶User-Agent: Mozilla/5.0 (FileMaker; Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.4 Safari/605.1.15 )")

See also

Release notes

  • Version 10.1

Blog Entries

This function checks for a license.

Created 29th January 2020, last changed 4th November 2021


WebView.Paste - WebView.PressKey