resolveRestRouteUrl
resolveRestRouteUrl(
routePath,root?):string
Defined in: wp-typia-rest/src/client.ts:145
Resolve a WordPress REST route into an absolute URL.
Parameters
Section titled “Parameters”routePath
Section titled “routePath”string
WordPress REST route such as /wp-typia/v1/items.
string = ...
Explicit REST root. Defaults to automatic WordPress discovery.
Returns
Section titled “Returns”string
An absolute URL ready to pass to fetch() or apiFetch.
Remarks
Section titled “Remarks”The resolver preserves query strings and hash fragments and supports both
pretty permalink roots and rest_route query-style roots.
Example
Section titled “Example”const url = resolveRestRouteUrl("/wp-typia/v1/items?limit=10");