functions-js
functions-js copied to clipboard
feat/Function query params
What kind of change does this PR introduce?
New feature added, query params support
What is the current behavior?
Currently the api doesnt support query params
What is the new behavior?
Be able to use query params from options.
Current way:
const { data, error } = await fclient.invoke<MirrorResponse>('mirror?hello=world', {})
New:
const { data, error } = await fclient.invoke<MirrorResponse>('mirror', {
params: {
hello: 'world',
}
})
This is specially good when you're using verbs like get and delete. I've used the axios way to receive qs, the parameter named "params"