Closed billmurrin closed 2 years ago
I believe the piece of code that is missing from the Context.request
method is similar to portion found within the self.http.get
method being called by Context.get
:
if kwargs:
# url is already a UrlEncoded. We have to manually declare
# the query to be encoded or it will get automatically URL
# encoded by being appended to url.
url = url + UrlEncoded('?' + _encode(**kwargs), skip_encode=True)
return self.request(url, { 'method': "GET", 'headers': headers })
In Context.request
, it adds body
to the dict, but is not appending it to the baseURL, unlike self.http.get
. Both methods appear to be calling http.request
.
response = self.http.request(path,
{'method': method,
'headers': all_headers,
'body': body})
return response
@billmurrin Thanks for the PR, we have merged the PR and the changes will be available in the next release.
@billmurrin we have a new python-sdk release 1.6.19, and your changes are available in this latest release.
I created a lookup on
/servicesNS/-/-/data/lookup-table-files
to obtain the lookup table files. I noticed that the result was limited to 30 results per request. With that in mind, I attempted to pass in parameters foroutput_mode=json&count=0
. The following code has been modified slightly and is based on a snippet found in theinvoke
function ofspurl.py
SDK example:The
output_mode
works properly and returnsjson
, however when usingcount
(oroffset
), it results in a 400 error:Now, if I use
binding.connect(**kwargs).get
and pass in the same dictionary{'output_mode': 'json', 'count' 0}
it gets properly passed as part of the GET request and returns all of the records.I believe the desired behavior on the
request
method would be to allow the use of Pagination and filtering parameters.