bitrix24-python-rest
bitrix24-python-rest copied to clipboard
GET method is always used
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.