I made the url for amazon SNS.
http://sns.ap-northeast-1.amazonaws.com?
AWSAccessKeyId=***********&Action=CreatePlatformEndpoint&PlatformApplicationArn=arn%3Aaws%3Asns%3Aap-northeast-1%3A776188326341%3Aapp%2FGCM%2Fmyapplication&
SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2016-03-20T23%3A08%3A26.601Z
&Token=APA91bFN3NV_cBqPtqc6vUSYm8C6o9m5UMoUAvp3qM6WWPlef5s8G8__RNQi_AljpgTJEq-hWqF7iQYJ-4OXKiRJc1uz5JvzDIXfgWd_5AC08S_m0bOIIdcWW2cMZjAyH7PrXpSu2h9j
&Version=2010-03-31&Signature=%2B%2BjtNjQL7qgxUgnwJIwvxMyOdyQnxlmlHtzOJJ%2FQU6A%3D
var xhrSNS = Ti.Network.createHTTPClient({
onload :function(e) {
Ti.API.info("testPost query:" + JSON.stringify(e));
Ti.API.info(this.responseText);
},
onerror : function(e){
Ti.API.debug("error:" + e.error);
}
});
xhrSNS.open('GET',url);
xhrSNS.send();
You should check log of Amazon SNS to know why HTTP error 400 is triggered. Sometime web server application refuse to handle client request, for example, due to firewall blocks the request because it does not have proper user agent information. This is possible. So you should investigate it from server side first.