Last active
October 10, 2017 18:07
-
-
Save csemrm/96407981dad495e17a57ed045fdc2f7f to your computer and use it in GitHub Desktop.
POST data for https://support.axway.com/en/case-global/view/id/INC0653137 this is not bugs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function onLoad(e) { | |
| var data = { | |
| "wireless" : JSON.stringify([{ | |
| "name" : "wlan0", | |
| "mode" : "infrastructure", | |
| "wps_method" : "pbc", | |
| "authentication" : "wpa_psk", | |
| "eap_type" : "", | |
| "ssid" : "NAVOTA" | |
| }, { | |
| "mode" : "infrastructure", | |
| "wps_method" : "pbc", | |
| "authentication" : "wpa_psk", | |
| "eap_type" : null, | |
| "ssid" : "OTA_DEMO", | |
| "wpa_psk" : "cjmgjtjrjj", | |
| "name" : "wlan0:1" | |
| }]), | |
| "interface" : JSON.stringify({ | |
| "name" : "wlan0", | |
| "enable" : true, | |
| "static" : false, | |
| "dhcp" : true, | |
| "autoip" : false, | |
| "ipMode" : "dhcp", | |
| "ip" : "192.168.43.1", | |
| "subnet" : "255.255.255.0", | |
| "gateway" : "0.0.0.0", | |
| "src_route" : true | |
| }) | |
| }; | |
| //indicator_win.open(); | |
| var xhr = Ti.Network.createHTTPClient({ | |
| onload : function() { | |
| //indicator_win.close(); | |
| Ti.API.info('this.responseText ' + this.responseText); | |
| json = JSON.parse(this.responseText); | |
| }, | |
| onerror : function(e) { | |
| //indicator_win.close(); | |
| Ti.API.info('this.responseText onerror' + this.responseText); | |
| }, | |
| timeout : 50000 | |
| }); | |
| Ti.API.info('data ' + JSON.stringify(data)); | |
| var url = "http://groomingapp.softvalleysolutions.com/index.php/rest/devices/add";//restURL + 'appusers/login'; | |
| Ti.API.info('url ' + url); | |
| xhr.open('POST', encodeURI(url)); | |
| xhr.send(data); | |
| } | |
| $.index.open(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <Alloy> | |
| <Window id="index" class="container" onOpen="onLoad"></Window> | |
| </Alloy> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment