Guest  

Welcome Guest, posting in this forum requires registration.

Pages: [1]
Topic: CORS issue while POST method is used in Ionic
Guest
Member
Posts: 2

Reputation: 1
CORS issue while POST method is used in Ionic
on: May 17, 2016, 16:41

Get method, gives the response but while using POST method I am getting issue of CORS 'Cross-Origin Request Blocked'

Guest
Member
Posts: 61

Reputation: 105
Re: CORS issue while POST method is used in Ionic
on: May 17, 2016, 16:43

You need to allow CORS for using POST method. Add these lines in the .htaccess file:

Header always set Access-Control-Allow-Origin "*"
Header always set Access-Control-Allow-Headers "Origin, X-Requested-With, Content-Type, Access-Control-Allow-Origin"
Header always set Access-Control-Allow-Methods "PUT, GET, POST, DELETE, OPTIONS"
Guest
Member
Posts: 2

Reputation: 1
Re: CORS issue while POST method is used in Ionic
on: May 17, 2016, 16:44

Thanks. It is working…

John kerry
Member
Posts: 28
John kerry
Reputation: 42
Re: CORS issue while POST method is used in Ionic
on: May 18, 2016, 00:36

http://readyourlessons.com/webservice-in-php-for-ionic-framework/

Please read this post may be it can help u

Pages: [1]
WP Forum Server by ForumPress | Lucid Crew
Version: 1.8.2 ; Page loaded in: 0.06 seconds.

Share This: