
Quote from emo on March 20, 2020, 1:27 pmI need to get a JSON from url with BASIC AUTH, and i don't see any example in the forum.
I create a javascript subroutine with:
var settings = { "url": "http://the url'", "method": "GET", "timeout": 0, "headers": { "Authorization": ["Basic theusernameinbase64=", "Basic thepasswordinbase64"] }, }; $.ajax(settings).done(function (response) { console.log (response); });And a button to call that subroutine, but how i display the results in a html container?
or can i use LoadJSON action with the username and password in the url, like http://username:password@thesite?
LoadJSON "http://usrname:password@theurl" [myvar] SetVar [json] [myvar] AlertBox "Prueba" "[myvar]" ""
I tested the second option and iget a null response
I finally use the first option creating a variable in the html container and asign in the subroutine:
var settings = { "url": "theurl", "method": "GET", "timeout": 0, "headers": { "Authorization": ["Basic usernameinbase64", "Basic passwordinbase64"] }, }; $.ajax(settings).done(function (response) { $App.json = (response); });I have made a plugin (the first one) for this. The only thing you need is to put in a container html [json] and fill the parameters in the plugin.
I need to get a JSON from url with BASIC AUTH, and i don't see any example in the forum.
I create a javascript subroutine with:
var settings = {
"url": "http://the url'",
"method": "GET",
"timeout": 0,
"headers": {
"Authorization": ["Basic theusernameinbase64=", "Basic thepasswordinbase64"]
},
};
$.ajax(settings).done(function (response) {
console.log (response);
});
And a button to call that subroutine, but how i display the results in a html container?
or can i use LoadJSON action with the username and password in the url, like http://username:password@thesite?
LoadJSON "http://usrname:password@theurl" [myvar] SetVar [json] [myvar] AlertBox "Prueba" "[myvar]" ""
I tested the second option and iget a null response
I finally use the first option creating a variable in the html container and asign in the subroutine:
var settings = {
"url": "theurl",
"method": "GET",
"timeout": 0,
"headers": {
"Authorization": ["Basic usernameinbase64", "Basic passwordinbase64"]
},
};
$.ajax(settings).done(function (response) {
$App.json = (response);
});
I have made a plugin (the first one) for this. The only thing you need is to put in a container html [json] and fill the parameters in the plugin.
Uploaded files:

Quote from luishp on March 21, 2020, 1:45 pm@emmanuel-fernandez just use a variable to save to information and then access each data separately so you can display each one in a Container. There are some sample apps included with VisualNEO Web to show you how to proceed. I think the included "Simplest Database Sample App", will show you a very similar situation, although data is loaded from a SQLite database.
Also please take a look here:
https://webhelp.visualneo.com/VariableObjects.html
https://webhelp.visualneo.com/JSON1.htmlRegards.
@emmanuel-fernandez just use a variable to save to information and then access each data separately so you can display each one in a Container. There are some sample apps included with VisualNEO Web to show you how to proceed. I think the included "Simplest Database Sample App", will show you a very similar situation, although data is loaded from a SQLite database.
Also please take a look here:
https://webhelp.visualneo.com/VariableObjects.html
https://webhelp.visualneo.com/JSON1.html
Regards.
Quote from luisgutierrezb on January 26, 2023, 7:20 pmHi, is possible to post source code of plugin, i need to work with supabase, and your plugin with modifications really help me,
regards
Hi, is possible to post source code of plugin, i need to work with supabase, and your plugin with modifications really help me,
regards

Quote from luishp on January 28, 2023, 11:32 am@luisgutierrezb what plugin source code do you exactly need?
@luisgutierrezb what plugin source code do you exactly need?