Add rpc suffix to URL for RPC call

This commit is contained in:
Cédric Krier committed 2023-11-12 23:43:19 +01:00
1 parent 7e068856e9
commit dbe5c74cb6
6 files changed
+9 -8

No files matched your search

+1 -1
View File
@@ -178,7 +178,7 @@
'params': params
})),
'dataType': 'json',
'url': (session.database || '.') + '/#' + args.method,
'url': (session.database || '.') + '/rpc/#' + args.method,
'type': 'post',
'complete': [function() {
Sao.common.processing.hide(timeoutID);
+3 -3
View File
@@ -189,7 +189,7 @@
'params': []
}),
'dataType': 'json',
'url': '.',
'url': 'rpc/',
'type': 'post',
'complete': [function() {
Sao.common.processing.hide(timeoutID);
@@ -602,7 +602,7 @@
'params': []
}),
'dataType': 'json',
'url': '.',
'url': 'rpc/',
'type': 'post',
'complete': [function() {
Sao.common.processing.hide(timeoutID);
@@ -624,7 +624,7 @@
'params': []
}),
'dataType': 'json',
'url': '.',
'url': 'rpc/',
'type': 'post',
'complete': [function() {
Sao.common.processing.hide(timeoutID);
+1 -1
View File
@@ -298,7 +298,7 @@ class ServerProxy(xmlrpc.client.ServerProxy):
try:
response = self.__transport.request(
self.__host,
self.__handler,
self.__handler + 'rpc/',
request,
verbose=self.__verbose
)
+1
View File
@@ -1,3 +1,4 @@
* Add rpc suffix to URL for RPC call
* Support mounting application under a prefix
* Send emails on chat messages
* Add path attribute on XML fields to specfiy a relative path value
+1 -1
View File
@@ -6,7 +6,7 @@ Remote Procedure Call
There are two protocols supported by trytond: `JSON-RPC`_ (Version 1.0) and
`XML-RPC`_.
The URL of the calls must end with the database name with a trailing '/'.
The format of the URL to call is ``<database name>/rpc/``.
The available methods are:
+2 -2
View File
@@ -25,7 +25,7 @@ __all__ = ['register_authentication_service']
logger = logging.getLogger(__name__)
@app.route('/<string:database_name>/', methods=['POST'])
@app.route('/<string:database_name>/rpc/', methods=['POST'])
def rpc(request, database_name):
methods = {
'common.db.login': login,
@@ -110,7 +110,7 @@ def reset_password(request, database_name, user, language=None):
abort(HTTPStatus.TOO_MANY_REQUESTS)
@app.route('/', methods=['POST'])
@app.route('/rpc/', methods=['POST'])
def root(request, *args):
methods = {
'common.server.version': lambda *a: __series__,