July 30, 2021, 10:05am
is there a way to provide an RPC endpoint with a parameter in the path, like:
There are some external services that requires such a path…
July 30, 2021, 3:43pm
I don’t know if this has first class support but as a ‘hack’ you can use this.
create whitelisted function to handle response.
URL would be /api/method/dotted.path.to.function
You can still add parameters as you need at the end, you’ll have to parse them yourself from the request URL.
July 30, 2021, 4:59pm
Thank you for the tip. I will give it a try!
Not too sure whether your request is invoked from an API or from the CLI? Nevertheless have a look at a tutorial I’ve written on parameters in specific from the CLI. I hope it’ll help in some manner.
[Tutorial] Using cURL for REST and RPC API calls
July 31, 2021, 12:41pm
Eugene, thanks for the link!
@ankush: your tip works like a charm!