local sBuf = CTNString();
cutil:httpGet('http://www.baidu.com',sBuf);
local sValue = cutil:u2a(sBuf:get());
print(sValue);
local sBuf = CTNString();
local sParam = [[
{"from_account":"9298292829292828"}
]];
cutil:httpPost('http://122.225.94.70:8080/MDDataService/jaxrs/webclientrest/getToken',sBuf,sParam);
local sValue = cutil:u2a(sBuf:get());
print(sValue);
local sParam = [[
{"accesstoken":"9298292829292828",
"classname":"SRM_Box",
"method":"getBoxMsg",
"content":{
"BoxCode":"abc"
}
}
]];
local sURL=[[http://122.225.94.70:8080/MDDataService/jaxrs/webclientrest]];
local paramList = CParamString()
paramList:add(cutil:a2u('Content-Type:application/json;charset=UTF-8'));
print('post request erp param: ' .. sParam)
local sBuf = CTNString();
cutil:httpPostWithHead(sURL,sBuf,sParam, paramList);
local sValue = cutil:u2a(sBuf:get());
print(sValue);