jquery ajax 调用
api_key=$('#acesskey').val();
secret_key=$('#sacesskey').val();
provider_name = $('#cname').val();
$.ajax({
type: "POST",
data: {api_key:api_key,secret_key:secret_key,provider_name:provider_name},
url: $SCRIPT_ROOT + "/login",
contentType: "application/json; charset=utf-8",
success: function(data) {
alert(data.status);
if(data.status == "True")
{
custom_ready();
}
}
});
python烧瓶代码
provider_name=request.args.get('provider_name')
api_key=request.args.get('api_key')
secret_key=request.args.get('secret_key')
print provider_name
print api_key
print secret_key
输出
无
无
无