I'm using IBM Worklight for my mobile app project. My problem is, how to stringify JSON in worklight adapter?
Username-impl.js
function getUsername(userAlias) {
path = "rest-rib/service/Login/login_username?userAlias=" + userAlias + "&locale=en";
var input = {
method : 'post',
returnedContentType : 'json',
path : path
};
return WL.Server.invokeHttp(input);
}
I got this error when invoke the adapter.
{
"errors": [
"Runtime: Failed to parse JSON string\nError 415: Unsupported Media Type"
],
"info": [
],
"isSuccessful": false,
"warnings": [
]
}
Thanks a lot in advance.