MCD - Level 1 Exam QuestionsBrowse all questions from this exam

MCD - Level 1 Exam - Question 28


What is the DataWeave expression to log the Content-Type header using a Logger component?

Show Answer
Correct Answer: D

In DataWeave, to access the headers of a message, you generally use the 'attributes.headers'. Additionally, to concatenate strings in DataWeave, you use the '+'. Therefore, the correct expression to log the Content-Type header would be 'Content-Type: ' + attributes.headers.'content-type'.

Discussion

1 comment
Sign in to comment
sirious09Option: A
Aug 16, 2022

A is correct