I am creating an Angular2 application to integrate JIRA. I am sending data to create a request on JIRA through rest/servicedeskapi/request API. When I am accessing it through Postman I am getting the desired output but through localhost, it is giving error Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'localhost:4200' is therefore not allowed access.
When I disabled CORS, the error changes to XSRF check failed.