Click or drag to resize
RESTServiceHelperTryParseRestUrlPathInternal Method
Tries to parse an absolute URL of a REST service endpoint and splits the absolute path to absolute path prefix and relative REST path.

Namespace: CMS.WebServices
Assembly: CMS.WebServices (in CMS.WebServices.dll) Version: 13.0.131
Syntax
C#
protected virtual bool TryParseRestUrlPathInternal(
	string absoluteUrl,
	out string absolutePathPrefix,
	out string relativeRestPath
)

Parameters

absoluteUrl
Type: SystemString
Absolute URL identifying REST service endpoint.
absolutePathPrefix
Type: SystemString
When this method returns, contains absolute path prefix of the absolute path (the path portion preceding '/rest'). Contains null if parsing fails.
relativeRestPath
Type: SystemString
When this method returns, contains relative path within the REST endpoint (e.g. '/rest/all'). Contains null if parsing fails.

Return Value

Type: Boolean
Returns true upon successful parsing, otherwise false.
Examples
Parses a URL in format http://example.com/web/virtual/path/rest/om.activitytype?format=xml to /web/virtual/path prefix and /rest/om.activitytype REST path.
See Also