change POST headers?

2 views
Skip to first unread message

nojo

unread,
Feb 12, 2009, 11:03:16 AM2/12/09
to Ojay talk
Is there a way to add a header to a cross-domain POST request with
Ojay?

James Coglan

unread,
Feb 13, 2009, 6:27:37 AM2/13/09
to ojay...@googlegroups.com
Is there a way to add a header to a cross-domain POST request with
Ojay?


I'm afraid not, as it's not possible. cross-domain POSTs are done by creating an invisible form element and submitting it, and forms cannot set headers. If you want headers on same-domain requests, call the following:

YAHOO.util.Connect.initHeader('X-Header-Name''header-value');

See http://developer.yahoo.com/yui/connection/#requestsignatures for more information.

Cheers,
James

Reply all
Reply to author
Forward
0 new messages