I worked around the problem by having angularjs changed the Content-type
to "application/x-www-form-urlencoded » and having the json data
serialized using jQuery.parm prior to issuing the angularjs post request.

CONCLUSIONS

The issue though is definitely in the way A4D handles « application/json »
content-type requests.

I must assume that A4D treats it as raw data leaving the parsing of the
payload to me which is fine as long as the query string would be handled
to allow session usage which is not the case for now.

CORS does not seem to work for me.

Maybe will it work better when we move to our production server that runs
A4D 6.1, the test server being still at 6.0.

As a result of the modified content-type, I removed the need to add the
required response headers to handle the Options request in the
postExecutionHook as no OPTIONS request is issued.

I though use « set response header("Access-Control-Allow-Origin"; "*") »
in my executable.

Regards,

---
Robert Ernens
HCTBA Consulting
Look2BookOnline - Web-à-la-Carte
4 Rés. Les Bois du Cerf
91450 Etiolles
Tél.: +33.950.58.95.80
GSM : +33.611.78.44.68


_______________________________________________
Active4D-dev mailing list
[email protected]
http://list.aparajitaworld.com/listinfo/active4d-dev
Archives: http://active4d-nabble.aparajitaworld.com/

Reply via email to