Closed D063520 closed 4 years ago
Not sure what you have in mind. As of the latest version on https://github.com/TriplyDB/Yasgui you can now add headers via a callback mechanism:
const yasgui = new Yasgui(document.getElementById("yasgui"), {
requestOpts: {
headers: () => {
console.log("setting headers");
return { sdf: "gs" };
}
}
});
Is this what you were looking for? Or, are you looking to handle the complete query event separately? If this is still an issue, you can report it here: https://github.com/TriplyDB/Yasgui
I wanted to over-right the callback function when pressing the yasqe_queryButton. I'm querying a standard endpoint put it is protected, so the user needs to authorize using a special header. As far as I see this is not possible. There is the yasqe.query() to pass a callback function, but I do not see an option to call it when pressing yasqe_queryButton since there: https://github.com/TriplyDB/YASGUI.YASQE/blob/05bb14dba3a45a750281fb29d6f6738ddecbb1dc/src/main.js#L636 the function yasqe.query() is passed on click without any argument. Is there a way to configure this? If not I would propose this as improvement.
PS: currently I'm not displaying the yasqe_queryButton and doing the functionality by putting my own button.