Magnolia HTTP request to RestAPI
#1 by bobino17 on Oct 31, 2016 11:38:35 AM

Hi,

I have create a simple RestAPI to check if user is logged or not.
With AngularJS I did a request:

$http({
method: "post",
url: "http://192.168.1.6:8085/.rest/public-users/v1/checkLogin",
headers: {
Authorization: 'Basic ' + _authdata
}
}).then(function successCallback(response) {
console.log("logged in");
}, function errorCallback(response) {
console.log("login failed");
});


problem is that Magnolia doesn't allow OPTIONS method on the request, and when I'm trying to do the request it give me this error:

2016-10-31 11:25:14,670 ERROR info.magnolia.rest.RestExceptionMapper: Exception thrown executing REST endpoint, returning 500
org.jboss.resteasy.spi.DefaultOptionsMethodException: No resource method found for options, return OK with Allow header



Anyone can help me please ?