简体   繁体   中英

How to call a (network local) 3rd party web service from jQuery when query string isn't long enough?

There are 3rd Party web service's that we call from a Fat client, it has been running without any problems for years.

I have been tasked with converting the Fat client into a mobile ready site that works on any common browser. As the 3rd Party service requires a cross domain call, I have to use JSONP, however this uses a HTTP GET and passes the data in the query string. Some of the objects we send are rather large and require a POST due to the limit on query string , however with JSONP this is not possible.

This answer has made me wonder if there is an approach I have missed. Does anyone have any suggestions?

It isn't possible to write a proxy handler/service that makes the call for me due to firewall/security restrictions at all the sites (there are 1000's sites, and they all have instances of this 3rd party service and will not change their rules). So it is important that the jQuery script can make this call from the browser itself.

Only option would be to find a way to compress what is sent to the server and have the server uncompress it.

Other option is to enable CORS on the remote server to allow the cross domain calls.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM