Using RPC with Custom Method Naming Conventions

25 views
Skip to first unread message

Satoshi Nakamoto

unread,
Mar 28, 2019, 4:12:13 PM3/28/19
to Gorilla web toolkit
I am trying to implement an existing RPC service with gorilla/rpc/v2. I want to be able to accept method names like `service_method` to call `Service.Method`. I attempted to modify the RequestInfo with a Before function but the requests are rejected as ill formed before it reaches this. Is there any way to do this?

Matt S

unread,
Mar 28, 2019, 4:23:37 PM3/28/19
to goril...@googlegroups.com
Could you open an issue on 
https://github.com/gorilla/rpc and show the code you’ve attempted to use ?

On Thu, Mar 28, 2019 at 1:12 PM Satoshi Nakamoto <da...@chainsafe.io> wrote:
I am trying to implement an existing RPC service with gorilla/rpc/v2. I want to be able to accept method names like `service_method` to call `Service.Method`. I attempted to modify the RequestInfo with a Before function but the requests are rejected as ill formed before it reaches this. Is there any way to do this?

--
You received this message because you are subscribed to the Google Groups "Gorilla web toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gorilla-web...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Satoshi Nakamoto

unread,
Mar 28, 2019, 5:09:25 PM3/28/19
to Gorilla web toolkit
I'm not sure a code example is helpful here, but I would be happy to provide one if there is any doubt. My reasoning for this is that `rpc.ServeHTTP` will return an error before any `Before` or `Intercept` function it called. I have made some comments on this issue perhaps we can continue the conversation there.


On Thursday, March 28, 2019 at 4:23:37 PM UTC-4, Matt Silverlock wrote:
Could you open an issue on 
https://github.com/gorilla/rpc and show the code you’ve attempted to use ?
On Thu, Mar 28, 2019 at 1:12 PM Satoshi Nakamoto <da...@chainsafe.io> wrote:
I am trying to implement an existing RPC service with gorilla/rpc/v2. I want to be able to accept method names like `service_method` to call `Service.Method`. I attempted to modify the RequestInfo with a Before function but the requests are rejected as ill formed before it reaches this. Is there any way to do this?

--
You received this message because you are subscribed to the Google Groups "Gorilla web toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to goril...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages