misc_bb 7 Posted Wednesday at 12:27 AM I'm recently facing an issue with a POST API call to my Servermethod function. I understand we can add a code to allow CORS header but I think that was applicable for Webmodule. I don't think this line of code is applicable in my servermethod function: Response.SetCustomHeader('Access-Control-Allow-Origin', '*'); In my case the function is directly called from front-end thru Axios, it works fine when it is using GET but since we want to pass a JSON, we want to apply a POST call. The call is coming from a different subdomain. Works fine within localhost testing and the same domain configuration. Is there a workaround for this to work? Sample code here. Any thoughts on a possible solution would be appreciated. Thank you. axios.post('https://url/staging.dll/datasnap/rest/TServerMethods1/"GetAllCompanies"/', requestBody,{ headers: { 'Content-Type': 'application/json' // Specify JSON format } }) Share this post Link to post