A client submits a GET request to a Mule 4.0 application to the endpoint /customers?id=48493. Where can the id be accessed in the Mule 4.0 application?

Study for the MuleSoft Associate / Development Fundamental Test. Master key concepts with flashcards and multiple choice questions, complete with hints and explanations. Prepare thoroughly for your exam!

Multiple Choice

A client submits a GET request to a Mule 4.0 application to the endpoint /customers?id=48493. Where can the id be accessed in the Mule 4.0 application?

Explanation:
In Mule 4, information from the HTTP request—like query parameters—lives in the inbound attributes, not in the payload or in variables. The id in the URL /customers?id=48493 is a query parameter, so you read it from attributes.queryParams. Access it as attributes.queryParams.id (or attributes.queryParams['id']). The payload holds the request body (often empty for a GET), and Vars or FlowVars are internal in-flow storage, not automatically populated from the request.

In Mule 4, information from the HTTP request—like query parameters—lives in the inbound attributes, not in the payload or in variables. The id in the URL /customers?id=48493 is a query parameter, so you read it from attributes.queryParams. Access it as attributes.queryParams.id (or attributes.queryParams['id']). The payload holds the request body (often empty for a GET), and Vars or FlowVars are internal in-flow storage, not automatically populated from the request.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy