开发者

Can a yui aSync Request send objects as parameters?

Is there a way that you can pass in a javascript object to a yui aSync request or does it only accep开发者_JS百科t a URI?


A YUI2 AsyncRequest sends a HTTP request to a URL using the request type you specify.

You are free to append information as query parameters for a GET or POST, or to send it as POST data.

To do so you could write a simple for in loop to iterate over your object & create a query string that you can then either set as the POST data or append to your URL if sending a GET. Be sure to use encodeURIComponent on the components as you are building your string.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜