Skip to content

Allow passing params while making GET requests to openx API#32

Merged
Cezar “ikari” Pokorski (ikari-pl) merged 1 commit intoopenx:developfrom
arseniy-panfilov:get_method_params
Aug 22, 2019
Merged

Allow passing params while making GET requests to openx API#32
Cezar “ikari” Pokorski (ikari-pl) merged 1 commit intoopenx:developfrom
arseniy-panfilov:get_method_params

Conversation

@arseniy-panfilov
Copy link
Contributor

I've found it somewhat inconvenient that one has to prepare the whole url manually in order to make a Client.get request. This means you should use urllib.urlencode or something like that to construct the query string.

This little fix makes it possible to streamline params argument to requests library which is capable of handling them correctly without any hustle:

client.get('/report/run', {'start_date': start_date, 'end_date': end_date, 'report': 'inv_rev'})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants