logo
down
shadow

Why Netbeans Test RESTful sample program doesn't work?


Why Netbeans Test RESTful sample program doesn't work?

Content Index :

Why Netbeans Test RESTful sample program doesn't work?
Tag : rest , By : Kaveh
Date : November 26 2020, 01:01 AM


Comments
No Comments Right Now !

Boards Message :
You Must Login Or Sign Up to Add Your Comments .

Share : facebook icon twitter icon

AJAX call doesnt work with RESTful web service?


Tag : ajax , By : kaart
Date : March 29 2020, 07:55 AM
this one helps. It looks like you are violating the same origin policy restriction which prevents you from sending cross domain AJAX calls. You have used http://localhost:8080/myController/getInfo as url but this will only work if the HTML page containing this javascript was served from http://localhost:8080/. Otherwise the browser won't allow you to perform this AJAX call.
As a possible workaround you could modify your REST service so that it supports JSONP in addition to JSON. Then you will be able to send GET requests to it (POST doesn't work with jQuery's JSONP implementation because it is using a
shadow
Privacy Policy - Terms - Contact Us © scrbit.com