Closed anandology closed 7 years ago
I think we can save a func_name -> path
mapping in the Client
object upon instantiation.
When client.call_func
would get executed, it would lookup the mapping and point to the right path.
The drawback I could think now is that if there are any changes to the config in the server side, the client needs to be instantiated again. This can be evaded by calling refreshing the mapping on every request.
What are your views @anandology ?
cache them once and provide a reload
function to force reload.
The client currently constructs the path to request by appending the function name to the base_url, even though the server specified a separate path for that function.
For example, if we start a server using the following configuration, the client will not be able to call the function hello.