How can I use wc_webservice to call a function from postgrest?

Testing from linux this simple example works very well:

curl “http://localhost:3000/rpc/myfunction
-X POST -H “Content-Type: application/json”