Quantcast
Channel: Opinion: Shopify Community - Shopify APIs & SDKs
Viewing all articles
Browse latest Browse all 25503

JSONP Request not wrapped on responce? by Jacob Cohen

$
0
0

Hey,

I need a product list on a remote site, so I try to pull the myshopify/admin/product.json

$.ajax({
            type: "GET",
            url: "https://key:pass@store.myshopify.com/admin/products.json",
            dataType: "jsonp",
            success: function(data){
                console.log("success");
                console.log(data);
            },
            error: function(error){
                console.log("error");
                console.log(error);
            }
        });

I get the json as a response, however my responce isn't wrapped as jsonp. So I get: "SyntaxError: invalid label"

I've pulled the cart.json in a similar fashion and the response came back wrapped and functional.

Any idea why the response doesnt support the callback? Help is greatly appreciated.


Viewing all articles
Browse latest Browse all 25503

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>