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

WebRequest.URLComponents

Queries parsed URL components.

Component Version macOS Windows Linux Server iOS SDK
WebHook 11.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "WebRequest.URLComponents"; WebRequest )   More

Parameters

Parameter Description Example
WebRequest The reference number of the web request. $WebRequest

Result

Returns JSON or error.

Description

Queries parsed URL components.
This is a convenience function to parse URL into components and separate query parameters into a JSON dictionary.

Examples

Queries path for an URL:

Set Field [ WebHook::URLParts ; MBS("WebRequest.URLComponents"; $WebRequest; "UTF-8") ]

Example result:
{ "Host": "127.0.0.1", "RelativeURL": "/path/file.txt?test=1&other=H%C3%B6llo", "URL": "http://127.0.0.1:9999/path/file.txt?test=1&other=H%C3%B6llo", "Scheme": "http", "Port": 9999, "Path": "/path/file.txt", "Query": "test=1&other=Höllo", "Parameters": { "test": "1", "other": "Höllo" } }

Example Databases

Blog Entries

This function checks for a license.

Created 24th October 2021, last changed 24th October 2021


WebRequest.Send - WebView.AddScriptMessageHandler

💬 Ask a question or report a problem