Since I tested apis at my end using GET and POST requests so I have to enable CORS to put api service in work. For post requests coming from cross domains we enable CORS other vise server response will be 500 as it is against Cross-Origin Resource Sharing.