Comments (4)
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.
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.
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.
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)
- Handshake error HOT 4
- Flutter: Response string encoding HOT 3
- Migrate the library to null safe version of dart HOT 4
- How to create new codec for list of struct HOT 2
- odoo connection HOT 5
- Authentication HOT 1
- Order and Limit? HOT 9
- Error occurred when running on web platform HOT 1
- Http cookie handling? HOT 1
- http.dart HOT 1
- Any plans on creating a xmlrpc server? HOT 4
- depends on meta ^1.1.8 HOT 2
- retry, cancel, timeout support? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dart-xmlrpc.