Giter Club home page Giter Club logo

Comments (4)

alamboley avatar alamboley commented on June 14, 2024 1

No problem, got it! The authenticate url should also use '/xmlrpc/2/common', it wasn't obvious in the doc. And <String, dynamic>{} did the trick 👍

Thanks again for your help!

from dart-xmlrpc.

a14n avatar a14n commented on June 14, 2024

I'm not sure if the error comes from request or response as I can't test it.

The standard codecs support Map<String, dynamic> but not other maps so you perhaps have to use ['db-odoo', 'firstname.name', 'my-pwd', <String, dynamic>{}] instead of ['db-odoo', 'firstname.name', 'my-pwd', {}].

Moreover you can use async/await to make the code easier to read.

  try {
    final versionResult =
        await xml_rpc.call(url + '/xmlrpc/2/common', 'version', []);
    print(versionResult);
    final authenticateResult = await xml_rpc
        .call(url, 'authenticate', ['db-odoo', 'firstname.name', 'my-pwd', <String, dynamic>{}]);
    print(authenticateResult);
  } catch (error) {
    print(error);
  }

from dart-xmlrpc.

alamboley avatar alamboley commented on June 14, 2024

Hi @a14n thanks for the answer. Unfortunately moving to <String, dynamic>{} gave me an error 400 bad request.

If you provide me your mail, I can give you some credential. Thanks again!

from dart-xmlrpc.

a14n avatar a14n commented on June 14, 2024

If you now get a 400 it means that the request is well encoded and sent to the server. It seems to be an issue with the API usage of the remote service.

Sorry but I don't have the time to read the doc and try to make it works :-/

from dart-xmlrpc.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.