From 9f649f3e403227eddde020df6e92c6baea0cdd12 Mon Sep 17 00:00:00 2001 From: Atul Patel Date: Wed, 14 Jun 2017 12:08:13 +0530 Subject: [PATCH] [FIX] pad: Use a `post` instead of a `get` on the request The old code used Request(data=)]( https://github.com/odoo-dev/odoo/blob/723b083cf5e51beec166059350466e5504db46c9/addons/pad/py_etherpad/__init__.py#L39) Which however means it did a POST: > the HTTP request will be a POST instead of a GET when the data parameter is provided yet the code currently uses `requests.get`, so [it looks very much like a mistake when converting from urllib to requests](https://github.com/odoo-dev/odoo/commit/01e35141479b8dfc4a390518f89fc52e7cec5396#diff-3303eb022ac36e1ef7258c28f24f6de6). --- addons/pad/py_etherpad/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/pad/py_etherpad/__init__.py b/addons/pad/py_etherpad/__init__.py index d1040cec852..fc9721eb9c8 100644 --- a/addons/pad/py_etherpad/__init__.py +++ b/addons/pad/py_etherpad/__init__.py @@ -30,7 +30,7 @@ class EtherpadLiteClient: params = arguments or {} params['apikey'] = self.apiKey - r = requests.get(url, data=params, timeout=self.TIMEOUT) + r = requests.post(url, data=params, timeout=self.TIMEOUT) r.raise_for_status() return self.handleResult(r.json())