Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to pass query parameters? #192

Closed
dominykas-senkus opened this issue Jan 30, 2020 · 5 comments
Closed

How to pass query parameters? #192

dominykas-senkus opened this issue Jan 30, 2020 · 5 comments
Labels

Comments

@dominykas-senkus
Copy link
Contributor

OpenShift Rest api supports query parameters but I haven't seen any examples how to pass them.
https://docs.openshift.com/container-platform/3.11/rest_api/api/v1.Pod.html#query-parameters-5

This is how I assume it would work but it doesn't.
client.api.v1.ns(namespace).pods().get(labelSelector="someLabel");
Is this functionality supported?

@lholmquist
Copy link
Member

In the Nodeshift module, we use query params in a few spots. here is one example: https://github.com/nodeshift/nodeshift/blob/master/lib/build-config.js#L64

This is getting the list of build configs, but it should be similar for the pod example you have above

@lholmquist
Copy link
Member

@Dominykas97 did this answer your question? can this be closed now? Perhaps you might want to contribute a small example on the readme :)

@dominykas-senkus
Copy link
Contributor Author

dominykas-senkus commented Feb 3, 2020

@lholmquist Yes, it is working. Thank you. You really helped me. Although, I still don't understand where the "qs" part comes from :)
Here is updated README: 9b9b750

@lholmquist
Copy link
Member

the client uses request under the hood, so those are just the request options you are passing in

@lholmquist
Copy link
Member

closed via #196

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants