I am having an issue with a http request I make using the python requests lib. When I make this query using the browsers, this is how the request looks like:
mysite/test?query=name%3A"My+Name+Is"*
Now, when I try to use the python lib, I use this dictionary as my params:
{'query' : 'name:My Name Is*'}
When I do this query using the browser, it works however, when I do this using the python lib, it does not work. Now my question is, should I be escaping the '*'? or are the spaces messing this up? the python lib should already be encoding this string so I would think I don’t need to do that prior to passing it. Any advice or comments are appreciated!
Here is a sample of the code making the request:
url = 'https://rink.hockeyapp.net/api/2/apps/app_id/app_versions/version_id/crash_reasons/search'
params={'per_page': 100, 'page': 1, 'query': 'reason:"Some String With Spaces*"'}
requests.get(url, params=params)