What is the correct syntax to add an employee ID as a URI parameter in an HTTP Listener path?

Refer to the exhibit.

What is the correct syntax to add an employee ID as a URI parameter in an HTTP Listener path?
A . (employeelD)
B . ${emp!oyeelD}
C . {employeelD}
D . # [employeelD]

Answer: C

Explanation:

Paths

The path of an HTTP listener can be static, which requires exact matches, or feature placeholders. Placeholders can be wildcards (*), which match against anything they are compared to, or parameters ({param}), which not only match against anything but also capture those values on a URI parameters map.

Take the following example paths for three listeners using a configuration that establishes api/v1 as the base path:

account/mulesoft/main-contact: only match the exact path request http://awesome-company.com/api/v1/account/mulesoft/main-contact account/{accountId}/main-contact: matches all path requests structured similarly, such as http://awesome-company.com/api/v1/account/salesforce/main-contact, and save salesforce as the value of accountId.

account/{accountId}/*: matches all path requests different from main-contact, such as http://awesome-company.com/api/v1/account/mulesoft/users, and save mulesoft as the value of accountId.

Mule Ref Doc: https://docs.mulesoft.com/http-connector/1.6/http-listener-ref#paths

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments