API is working from other domains but when I tried to call API from my subdomain it gives error.
I tried with some headers in my code but API returns CORS error.
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: GET, PUT, POST, DELETE, OPTIONS, post, get');