You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right, but our http library itself encodes those values when it makes the request (I had a bug in the opposite direction recently, maybe this is actually related to that)
We can look at encoding it at the places you just mentioned, I just want to make sure nothing gets double encoded
looking here the code manually smooshes up the URL, but instead could be parameters['params'] = request_object.get_query_params() or similar
there's no problem with different HTTP methods -- body data is data={...}; so even on a post request you can set params={...} and everything works fine
Activity
kurtbrose commentedon Oct 29, 2019
https://www.urlencoder.io/python/ -- recommended reading (-: should be an easy fix
t8y8 commentedon Oct 31, 2019
We aren't doing encoding ourselves anywhere, it's handled by the http library we use.
I can take a look when I have time, but I'm not sure what options we have available to us over the lower layer's encoding
kurtbrose commentedon Oct 31, 2019
I fixed this by doing
urlencode()on values before passing them to the APIkurtbrose commentedon Oct 31, 2019
dude, you are doing string munging to generate query params
server-client-python/tableauserverclient/server/request_options.py
Lines 95 to 97 in b260ebc
https://github.com/tableau/server-client-python/blob/master/tableauserverclient/server/request_options.py#L164
kurtbrose commentedon Oct 31, 2019
sorry for being a little short, trying to get tableau integration working has been my life for the past week or so
t8y8 commentedon Nov 1, 2019
Right, but our http library itself encodes those values when it makes the request (I had a bug in the opposite direction recently, maybe this is actually related to that)
We can look at encoding it at the places you just mentioned, I just want to make sure nothing gets double encoded
kurtbrose commentedon Nov 1, 2019
makes sense -- maybe it is possible to pass the query string to HTTP as a key/value dict instead of doing the string construction yourself?
kurtbrose commentedon Nov 1, 2019
that seems to be the recommended way to use requests: https://requests.kennethreitz.org/en/master/user/quickstart/#passing-parameters-in-urls
kurtbrose commentedon Nov 1, 2019
server-client-python/tableauserverclient/server/endpoint/endpoint.py
Line 45 in b260ebc
parameters['params'] = request_object.get_query_params()or similarthere's no problem with different HTTP methods -- body data is
data={...}; so even on a post request you can setparams={...}and everything works finejacalata commentedon Feb 16, 2023
This works today.