Hi
I am trying to retrieve a list of nodes using jsonp. This works fine if I use json directly from a browser.
Would really appreciate any pointers in the right direction.
Here are my request and response headers. The response content is an empty array: []
Request URL:http://www.myhost.com/testrest/node.json?_dc=1331582974127&page=1&start=0&limit=25&callback=Ext.data.JsonP.callback1
Request Method:GET
Status Code:200 OK
Request Headersview source
Accept:*/*
Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.3
Accept-Encoding:gzip,deflate,sdch
Accept-Language:en-US,en;q=0.8
Connection:keep-alive
Cookie:SESSc5a9244c8264b5631f07d1ded6d64bb2=960m2rgdinhcvdh02tscbgfor0; __utma=34191217.1042080115.1330790487.1330790487.1330790487.1; __utmz=34191217.1330790487.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); SESScad999f3b4a94bce60ca03d548931c6a=1PhHl0E0Sr8tp-HBjfmwFIDCNcVj84Pb6EdRc8Xkp9w; has_js=1; Drupal.toolbar.collapsed=0
Host:www.myhost.com
Referer:http://www.myclient.com/SampleApp/
User-Agent:Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.79 Safari/535.11
Query String Parametersview URL encoded
_dc:1331582974127
page:1
start:0
limit:25
callback:Ext.data.JsonP.callback1
Response Headersview source
Cache-Control:no-cache, must-revalidate, post-check=0, pre-check=0
Connection:close
Content-Length:2
Content-Type:application/json
Date:Mon, 12 Mar 2012 20:11:15 GMT
ETag:"1331583075"
Expires:Sun, 19 Nov 1978 05:00:00 GMT
Last-Modified:Mon, 12 Mar 2012 20:11:15 +0000
Server:Apache/2.2.14 (Ubuntu)
X-Powered-By:PHP/5.3.2-1ubuntu4.10My endpoint config is
Server info main object:
stdClass Object
(
[module] => rest_server
[endpoint] => testrest
[endpoint_path] => testrest
[debug] => 1
[settings] => Array
(
[formatters] => Array
(
[json] => 1
[jsonp] => 1
[bencode] =>
[php] =>
[rss] =>
[xml] =>
[yaml] =>
)
[parsers] => Array
(
[application/json] => 1
[application/vnd.php.serialized] =>
[application/x-www-form-urlencoded] =>
[application/x-yaml] =>
[multipart/form-data] =>
)
)
)
Comments
Comment #1
kylebrowning commented