doca
July 30, 2021, 10:05am
1
Hi all,
is there a way to provide an RPC endpoint with a parameter in the path, like:
http://[myserver]/doted.path.to.function/{parameter}
and
http://[myserver]/doted.path.to.function/{parameter}/furtherPath/
There are some external services that requires such a path…
Thanks
DoCa
ankush
July 30, 2021, 3:43pm
2
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.
1 Like
doca
July 30, 2021, 4:59pm
3
Thank you for the tip. I will give it a try!
Hello @doca
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
doca
July 31, 2021, 12:41pm
5
Eugene, thanks for the link!
@ankush : your tip works like a charm!