Pavan Kumar
Pavan Kumar

Reputation: 1735

In Magento how to get JSONP data using REST calls

I am new to the magento. I have installed everything and I have modified the REST roles and attributes for customer and guest. Now I am receiving the data when i give my url like http://192.168.1.101:8010/magento/api/rest/products in XML format.

To receive this in JSONP format I read that we have to include header like header ('Content-Type: application/javascript'); .. BUt in which file we have to include this header and where are those files located??? I dont know correctly but I think we have to include this header in api's of magento.. where are those located???

Please help me.. because time is running out..

Upvotes: 0

Views: 675

Answers (1)

chanz
chanz

Reputation: 1267

Please add header as follow Content-Type:application/json for JSON .

Upvotes: 2

Related Questions