Using angularjs
to write data in another machine's file failed:
No 'Access-Control-Allow-Origin' header is present on the requested resource
Setting:
anjular js
client:
$http.post(url, settingData)
rest
server side:
return Response.status(200).entity(jsonObject.toString())
.header("Access-Control-Allow-Origin", "*")
.header("Access-Control-Allow-Methods", "GET, POST, DELETE, PUT")
.allow("OPTIONS")
.build();