pass url parameters to end point "Custom tool" #875
Replies: 1 comment 1 reply
-
Hi @remixdance, You could try something like this: Changing the |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi I dont know if is possible to pass a param on the url of my end point that I´m using in my custom tool for example:
const fetch = require('node-fetch');
const url = 'https://myserver.com/api/v2/report?Name=ABC;
const options = {
method: 'GET',
headers: {
'Authorization': 'c',
'Content-Type': 'application/json'
}
};
try {
const response = await fetch(url, options);
const text = await response.text();
return text;
} catch (error) {
console.error(error);
return '';
}
Where the params it could be Name, ID, or Company etc and this params make dynamically or Do I need to make a custom tool per param?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions