0

I use a server method in my project, when I run in preview mode and get a preview of my project on a web browser, I have the expected result. However, when I run it on emulator or device I have the following error message: "POST http://192.168.1.247:8108/rest/SuperHero/myMethod 403 (Forbidden)".

Do you know why I have this error? What is the cause of this? How can I fix this ?

CoCoNours
  • 233
  • 1
  • 2
  • 13
  • Did you get 403 error with GET request? Looks like it might relate to CORDOVA's configuration. You might have to configure CORDOVA to allow access to 192.168.1.247:8108, or set up CORS in Wakanda. Reference: [Post Request on PhoneGap does not work](http://stackoverflow.com/questions/24973290/cordova-post-request-forbidden-403-not-reaching-dispatcher-servlet) – Xiang Liu May 11 '17 at 22:51
  • thank you for the answer. In the config.xml I have this line : so I think its ok, so I setup CORS in Wakanda to allow access to 192.168.1.247:8102. I can access my data via rest. But I still have this error message. – CoCoNours May 12 '17 at 14:28
  • Access data via REST typically uses GET instead of POST. Can you test updating your data using [$method=update](http://doc.wakanda.org/home2.en.html#/HTTP-REST/Manipulating-Data/methodupdate.303-815150.en.html) POST request? If it does not work, it could mean that the server does not allow POST request. – Xiang Liu May 18 '17 at 16:43

0 Answers0