hyTags
HomeHome DocumentationDocumentation

url-set-path-components

Sets the path components of a URL and returns a new URL
Parameter
Type
Description
self
Url
The URL to modify
components
[string]
An array of path components
return
url
A new URL with the path components updated
Test Case:Set path components
    <div></div>
    
    <value-scope return="[string]">
      <array-new type="string">
      <array-append value>
      <array-append value="new">
      <array-append value="path">
    </value-scope>
    <url-from-string string="https://example.com/old">
    <url-set-path-components>
    <url-to-string>
    <assert-equal value="https://example.com/new/path" type="string">
    
    👆 Try to change something!
  • Test succeeded Test failed