-
Notifications
You must be signed in to change notification settings - Fork 532
Open
Description
Hey, I am running pyrebase on python 2.7 (my bad!) but I thought that this might interest you anyway. It's possible the urlencoding/requests package behave differently on python3.
Today my requests to firebase began to be rejected for double-quoting of the query string. I guess this is a change on their end which is why I bring it up here.
the request from build_request_url:
http://..firebase./path.json?orderBy=%2522progress%2522&equalTo=0
you can see the " is encoded to %22 and then to %2522.
I replaced the urlencode of parameters wth an unencoded parameters string and it's better:
parameters_string = '&'.join('{0}={1}'.format(k,v) for k,v in parameters.iteritems())
request_ref = '{0}{1}.json?{2}'.format(self.database_url, self.path, parameters_string)
Maybe I should have just removed the quote() of the string parameter...
redaben, Narender-350, ronhe, shaipeer, abhatt95 and 1 more
Metadata
Metadata
Assignees
Labels
No labels