ux aget

Description

A wrapper for ux.ajax (GET)

Parameters

string

URL to load

function

Callback function to execute after the command receive a reply

object

JSON object with the options:

contentType

json|multipart|standard

timeout

Max time to wait a reply

loading

Block the app while sending/receiving data. Default: true

Return

void


Example


        ux.aget( 'http://www.google.es'
                , function(err, result) {
                    if ( !err /* && result hasn't errors */ ) {
                            ux.dialog(_t("Received!"),result, { buttons:[{id:'ok', title:_t("Ok"),type:"is-success"}] } );
                    } else {
                        ux.dialog(_t("Error"),_t("An unknown error happened. Please wait some seconds and try again."), { buttons:[{id:'ok', title:_t("Ok"),type:"is-danger"}] } );
                        ux.loading(false);
                    }
                }
            );

No Preview available

 

"Push to execute" - a link appears to execute a command.