I have trouble making additionalScope work with REST endpoints.
To me it seems that I cannot set generic POST request where body params are set using additionalScope.
See this ugly code
requestInput.setValue({
foo:'2024-10-01',
fooEnd: '2024-10-17',
})
let a= await getQuery.trigger()
let aa= await getQuery2.trigger({
additionalScope: {
foo:'2024-10-01',
fooEnd: '2024-10-17',
}
})
getQuery
has foo
and fooEnd
to read requestInput
value and it is the only way I can make it work.
I try to use getQuery2
as generic request so foo
and fooEnd
are not set and I want them to be added when triggering additionalScope
but it doesn't work.
Any advice as this is not a nice code to have and maintain?