ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 117 - MCD - Level 1 discussion

Report
Export

A flow contains an HTTP Listener as the event source. What is the DataWeave expression to log the Content-Type header using a Logger component?

A.
#['Content-Type: ' ++ attributes.headers.'content-type']
Answers
A.
#['Content-Type: ' ++ attributes.headers.'content-type']
B.
#['Content-Type: ' + headers.'content-type']
Answers
B.
#['Content-Type: ' + headers.'content-type']
C.
#['Content-Type: ' + attributes.headers.'content-type']
Answers
C.
#['Content-Type: ' + attributes.headers.'content-type']
D.
#['Content-Type: ' ++ headers.'content-type']
Answers
D.
#['Content-Type: ' ++ headers.'content-type']
Suggested answer: A

Explanation:

Option 1 is the only correct choice due to two reasons. 1) Concatenation is always with ++ sign and not with + sign which makes option 2 and 3 wrong 2) hearders can be accessed with attributes. headers and not with only headers which makes option 4 incorrect

asked 18/09/2024
Anthony Bradley
43 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first