[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).
This commit is contained in:
committed by
Yannick Tivisse
parent
2c9ea8700a
commit
9f649f3e40
@@ -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())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user