In mule4 at RequestProcessor we set some hedaers and queryparams. eg: for headers;
output application/java
---
{
"xXX- applicationid" : vars.'applicationid',
"XX-username" : p('username'),
"XXX-signature":vars.'signature'
}
<http:request method="GET" doc:name="HTTP-Get"
doc:id="ec8910c5-36fe-4367-9234-d459776ac8e3" config-ref="request_config"
path="${auth.path}">
<http:headers><![CDATA[#[output application/java ---
{
"xXX- applicationid" : vars.'applicationid',
"XX-username" : p('username'),
"XXX-signature":vars.'signature'
}
]]]></http:headers>
</http:request>
This works fine. But in future, if we want to add another header parameter, we need to come here and edit this config. I don't want to do it here.. I just want to pass all my headers as a variable /component here..So, i don't need to edit this connectors in future. rather, I could do at that variable/component setting level and we can reuse this connectors .
How to do this in mule4 for more extensible/manageable connectors?