Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Possible Bug with binding class request method related to GET parameters #261

Closed
@billmurrin

Description

@billmurrin

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 for output_mode=json&count=0. The following code has been modified slightly and is based on a snippet found in the invoke function of spurl.py SDK example:

return binding.connect(**kwargs).request(path, method=method, body=urllib.urlencode({'output_mode': 'json', 'count': 0}))

The output_mode works properly and returns json, however when using count (or offset), it results in a 400 error:

HTTP 400 Bad Request -- {"messages":[{"type":"ERROR","text":"Argument \"count\" is not supported by this handler."}]}

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.

return binding.connect(**kwargs).get(path, **{'output_mode': 'json', 'count': 0})

I believe the desired behavior on the request method would be to allow the use of Pagination and filtering parameters.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions