Allow HTTP headers to be added to Ajax requests
Add a way for allowing easy specification of custom HTTP header attributes.
Br's,
Marius
Br's,
Marius
Leave a comment
on 2010-02-06 21:50 *
By github.importer
Imported from GitHub: http://github.com/dpp/liftweb/issues/192/find
on 2010-02-24 09:35 *
By marius.danciu
Description changed from Add a way for allowing easy... to Add a way for allowing easy...
Milestone changed from Lift 2.0-M3 to Lift 2.0-M4
on 2010-03-30 09:11 *
By marius.danciu
Assigned to changed from marius.danciu to mads379
Status changed from Accepted to New
Reassigning to Mads ... Hopefully he'll have time to finish it.
on 2010-10-27 21:50 *
By marius.danciu
Dear David,
Unfortunately I don't have much time to actually work on these tickets. To answer your question "Is it that browser-side Ajax requests need tuneable headers?"... Yes, I think it worth allowing users to even send custom HTTP headers. Thus one could invoke REST API's from web interface and sometimes the REST API's need meta information in custom headers.
I'm thinking of something like:
def ajaxInvoke(headers: List[(String, String)], func: () => JsCmd)
the header parameters would be passed to the liftAjax.lift_ajaxHandler JS function call. Internally this JS function would need to obtain the XMLHTTPReques object and call setRequestHeader to actually set the HTTP headers.
Br's,
Marius
Unfortunately I don't have much time to actually work on these tickets. To answer your question "Is it that browser-side Ajax requests need tuneable headers?"... Yes, I think it worth allowing users to even send custom HTTP headers. Thus one could invoke REST API's from web interface and sometimes the REST API's need meta information in custom headers.
I'm thinking of something like:
def ajaxInvoke(headers: List[(String, String)], func: () => JsCmd)
the header parameters would be passed to the liftAjax.lift_ajaxHandler JS function call. Internally this JS function would need to obtain the XMLHTTPReques object and call setRequestHeader to actually set the HTTP headers.
Br's,
Marius