Nav

readUrl

readUrl(String, String, Object)

Same as the read operator, but readURL uses a URL as input. Otherwise, it accepts the same arguments as read.

The default input content type is application/dw.

For other formats and reader configuration properties, see Data Formats Supported by DataWeave.

Transform

        
     
1
2
3
4
%dw 2.0
output application/xml
---
read('{"url":"https://www.mulesoft.com/"}')
Output

        
     
1
2
<?xml version='1.0' encoding='UTF-8'?>
<url>https://www.mulesoft.com/</url>

We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used and to tailor advertising. You can read more and make your cookie choices here. By continuing to use this site you are giving us your consent to do this.

+