dimanche 30 novembre 2014

Setting HTTP request header for all types of request in Rails


I am trying to figure out a way to send data from the browser to the server without storing it. I don't want to use a cookie.


The value is produced on the browser via javascript and I want it to be submitted with all the HTTP requests, for all methods (GET, PATCH, POST, DELETE).


I know I should probably provide some code of what I've done so far, but everything I've tried ended up to a "bump". I'm as blind as when I started looking.


I am using jQuery in my app, for all that this might be useful.


It has proven easy to do with ajax requests, but I want all types of requests.


I'm approaching the conclusion that the nature of what I want to do is apparently evil and, hence, not allowed by the relevant RFC's. My intentions are not evil at all, for the record.





Aucun commentaire:

Enregistrer un commentaire