我正在关注 MobileFirst Platform 7 的Java SQL 适配器教程。我尝试使用 REST 调用类型创建新用户@POST
,但 chrome 控制台是
响应是
列“userId”不能为空
我认为这个过程的参数设置为空值
这是我的代码
var userId = "test";var lastName = "test";var firstName = "test";var password = "test";
function createUser(userId,lastName,firstName,password){
busyIndicator.show();
var resourceRequest = new WLResourceRequest("/adapters/UserAdapter/", WLResourceRequest.POST);
resourceRequest.setQueryParameter("userId", userId);
resourceRequest.setQueryParameter("lastName", lastName);
resourceRequest.setQueryParameter("firstName", firstName);
resourceRequest.setQueryParameter("password", password);
resourceRequest.send().then(
createUserSuccess,
createUserFailure
);}