Curl works but ajax not working in Shopify private app
I have created a private app from my store and try to hit https://API_KEY:PASS@STORE_NAME/admin/orders.json URL using ajax and curl. It is working if I use curl but not with ajax. Can anyone explain here what is the issue?