nb_transfer_get_GNSS_position.are
/* DESC: This script will supervise a specified host.
 * Copyright (C) 2023 NetModule AG, Switzerland, rfa
 */
 
// int nb_transfer_get ( string usr, string pwd, string url, string path)
 
usr = "";
pwd = "";
file = "out.txt";
 
gps_long = nb_status("gnss").GNSS1_LONGITUDE;
gps_lat = nb_status("gnss").GNSS1_LATITUDE;
url = sprintf("https://httpbin.org/get?longitude=%s&latitude=%s", gps_long, gps_lat);
 
ret = nb_transfer_get (usr , pwd , url, file);
 
printf("nb_transfer_get() returns: %s\n", ret == -1 ? "ERROR" : "OK");
printf(fread(fopen(file, "r"), 1024));