views:

26

answers:

1

Hi I'm trying to build up a rest Service which provide JSON response. Yesterday i figured about what is JSONP, why to use it an so and so. Today i would like to make some test with my new version of my service. To test it, i use HTTPbuilder. But i can't get it working correctly. Here is the start of my test:

 def client = new RESTClient("http://localhost:"+SERVER_PORT)
 def resp = client.get(path:'/music', contentType:JSON);

And here is the error i got:

ATTENTION: Error parsing 'application/javascript' response
 net.sf.json.JSONException: Invalid JSON String

How can i help httpbuilder to understand that the response is a JS callback?

A: 

Ok i was a littel dumb on this one. The accepted content type must be ContentType.ANy

BenZen