Contact Us 1-800-596-4880

URL (dw::core::URL)

This module contains helper functions for working with URIs.

To use this module, you must import it to your DataWeave code, for example, by adding the line import * from dw::core::URL to the header of your DataWeave script.

Functions

Name Description

compose

Uses a custom string interpolator to replace URL components with a encodeURIComponent result. You can call this function using the standard call, or a simplified version.

decodeURI

Decodes the escape sequences (such as %20) in a URI.

decodeURIComponent

Decodes a Uniform Resource Identifier (URI) component previously created by encodeURIComponent or a similar routine.

encodeURI

Encodes a URI with UTF-8 escape sequences.

encodeURIComponent

Escapes certain characters in a URI component using UTF-8 encoding.

parseURI

Parses a URL and returns a URI object.

Types