27 Mar 2012 4:41 AM #1
Answered: Ajax POST to webservice.
I need to know how to send a POST to a different server.
I can't do it with Ajax.request as is a different domain.
I have a url with some parameters, and the other side needs to receive via POST.
On the client, JsonP is the only way to do a cross-origin request but it is GET only. To do a POST, you would need a server side script to do it.
27 Mar 2012 5:30 AM #2
- Join Date
- Mar 2007
- Gainesville, FL
- Vote Rating
On the client, JsonP is the only way to do a cross-origin request but it is GET only. To do a POST, you would need a server side script to do it.Mitchell Simoens @LikelyMitch
Sencha Inc, Senior Software Engineer
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services email@example.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!
When posting code, please use BBCode's CODE tags.
27 Mar 2012 6:17 AM #3
Doc on how to do so is available here:
As for cross-domain matters, your server-side script should return these http headers:
This works for me. I hope it helps!