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>