-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
client.call is not a function #19
Comments
How do you get the |
Actually it was a mistake I was calling the client directly. But I would like to know how do I have custom web services as array. Like; Service: ["service1", "sercive2"......]. I want to be able to call a function later from my loaded services on the client, but not only one service. Does client.call( ) call a service? If I don't provide any custom service I receive this error: Unable to initialize the client: Error: authentication failed: Web service is not available. (It doesn't exist or might be disabled.). I would like to provide more than one service. thanks |
That's not supported and not usually needed, too. What is your use case? In a typical scenario, the server is configured to expose all the required functions to perform the given task via a client in a single service. Are you sure you are not interchanging external functions with external services? Why do you need multiple services? |
I organized the functions in services as a json where I can call in an organized way, for example; message_service contains only functions related to messages. course_service contains course related functions. |
Aha. Well, if you insist in such a setup, you will need to instantiate multiple clients, too - one for messaging, one for course etc. But again, I would not encourage for such server-side setup. I think it only overcomplicates things, require the same setup (such as authorised users, IP restrictions etc) be performed multiple times etc. Also the tokens are generated by Moodle to use particular individual services etc. |
I am trying to use the node client with react js and I am getting this error from this line
It says client.call is not a function. How to fix it? Thanks
The text was updated successfully, but these errors were encountered: