Uh oh!
There was an error while loading. Please reload this page.
Discussion: Custom query params - #99
Conversation
events_link=api._links['events']
events_link.query_params= { filter: "modified_date gt '2016-01-01'" }
events=events_link['items']dblock
commented
Mar 13, 2016
HAL wants you to be much more strict with query parameters, ie. you should only expand those that are decalred. See #84 for a discussion on this, I'd like to support both ways, but I think all it needs is to relax the existing implementation where we only expand the existing template with known parameters. |
dblock
commented
Mar 13, 2016
See hannesg/uri_template#14 and #92 for a suggested implementation. |
dblock
commented
Mar 13, 2016
I am going to close this because the implementation in #92 is a lot cleaner, IMO, @joshco see if it accomplishes the same thing as what you need? Note though that from the high level you probably want to stick to HAL as defined, ie. no random parameters should be appended to the request, they need to be "declared" by the API. |
joshco
commented
Feb 6, 2017
Strangely, upgrading from Ruby 2.0.0 to 2.3.1 is breaking my add_query_params. Any kind folk have any idea why I'm getting this error below? Before the call in the error, I'm setting query params via: Then calling The error is with this code in the pull request: https://github.com/codegram/hyperclient/pull/99/files#diff-6693c41efdfa7bd40a113952ff75dd45R174
|
dblock
commented
Feb 6, 2017
Is Try to write a test for this? |
joshco
commented
Feb 13, 2017
That fixed it.
|
This is just for discussion, merge not requested. Re issue #97
Allow the caller to set custom query parameters when fetching a link