I am trying a cors-platform API call for a post and get method to register the data in vue js
Note: The API call should be a cross-platform
but I am facing this issue
Response to a preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin is therefore not allowed access.
I tried this solution "CORS issue: No 'Access-Control-Allow-Origin' header is present on the requested resource" but still am getting this error. I don't know how to solve this
Here is my code:-
methods:{
signup () {
console.log("hi i got the response");
this.$http.get("http://otherSite.com",{
userName:this.register.username,
Email:this.register.email,
Password:this.register.password,
}).then(function(data){
console.log(data);
});
}
}