Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 9.2   9.3   9.4   9.5   10.0   10.1   10.2   10.3   10.4   10.5    Statistic    FMM    Blog  

WebView.PostURL

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

Component Version macOS Windows Server FileMaker Cloud FileMaker 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

Blog Entries

Release notes

  • Version 10.1

Created 29th January 2020, last changed 29th January 2020


WebView.Paste   -   WebView.PressKey

Feedback: Report problem or ask question.




Links
MBS Xojo Plugins