We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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 do you add arbitrary params to a url?
The text was updated successfully, but these errors were encountered:
I believe you can add them as properties on the object that is passed to the API endpoint. For example, with an API like the following:
import { buildApi, get } from 'redux-bees'; const apiEndpoints = { getPost: { method: get, path: '/posts/:id' }, }; const config = { baseUrl: 'https://api.yourservice.com' }; const api = buildApi(apiEndpoints, config);
you could elsewhere do:
api.getPost({ id: 12, artist: 'PurrpleCat' })
which will send an HTTP request to the following URL:
https://api.yourservice.com/posts/12?artist=PurrpleCat
Sorry, something went wrong.
No branches or pull requests
How do you add arbitrary params to a url?
The text was updated successfully, but these errors were encountered: