bitrix24-python-rest icon indicating copy to clipboard operation
bitrix24-python-rest copied to clipboard

GET method is always used

Open ipeterov opened this issue 3 years ago • 0 comments

https://github.com/akopkesheshyan/bitrix24-python-rest/blob/master/bitrix24/bitrix24.py#L87 Let's say I'm calling crm.deal.add. method.rsplit('.', 1)[0] will compute to crm.deal.

Looks like this is not breaking stuff, since Bitrix accepts GET requests even for methods like crm.deal.add and crm.deal.productrows.set.

My suggestions: A: Embrace it. Always use GET for all methods since it works. Remove POST-specific code. B: Fix it. Check method.rsplit('.', 1)[1]. Also add data=p.encode('utf-8') to post version since it doesn't work with cyrillic symbols.

I don't feel competent enough to chose between these options though.

ipeterov avatar Oct 29 '20 15:10 ipeterov