rest script
var ScriptIncludeRest = Class.create();
ScriptIncludeRest.prototype = {
initialize: function(a) {
gs.log('@@@:テスト中だよ!');
try{
var r = new sn_ws.RESTMessageV2('ZIP Search','get');
var url = String(r.getEndpoint());
gs.log(url);
r.setEndpoint('http://api.thni.net/jzip/X0401/JSON/' + a.param1 + '/' + a.param2 + '.js');
var response = r.execute();
var responseBody = response.getBody();
gs.log('これはレスポンスボディ:'+ responseBody);
var httpStatus = response.getStatusCode();
}
catch(ex){
var message = ex.getMessage();
}
gs.log('@@@テスト終わりだよ');
},
type: 'ScriptIncludeRest'
};
ScriptIncludeRest.prototype = {
initialize: function(a) {
gs.log('@@@:テスト中だよ!');
try{
var r = new sn_ws.RESTMessageV2('ZIP Search','get');
var url = String(r.getEndpoint());
gs.log(url);
r.setEndpoint('http://api.thni.net/jzip/X0401/JSON/' + a.param1 + '/' + a.param2 + '.js');
var response = r.execute();
var responseBody = response.getBody();
gs.log('これはレスポンスボディ:'+ responseBody);
var httpStatus = response.getStatusCode();
}
catch(ex){
var message = ex.getMessage();
}
gs.log('@@@テスト終わりだよ');
},
type: 'ScriptIncludeRest'
};