reqwest icon indicating copy to clipboard operation
reqwest copied to clipboard

.ajaxSetup predefines all parameters

Open Calamari opened this issue 10 years ago • 7 comments

If you have to set some custom headers on every request like CSRF tokens, it is tedious to specify them on every request. Allow .ajaxSetup to predefined them once, so they are used in every request.

Calamari avatar Sep 12 '15 16:09 Calamari

+1, specially for CSRF tokens. I'm currently experiencing this issue.

@ded is this something you'd be interested in adding?

joaocunha avatar Oct 19 '15 17:10 joaocunha

this is a good change and I definitely welcome it. At this moment the pull request is conflicting. Would you mind confining your commits to just src/reqwest.js and the README file? I can run the builds when appropriate.

ded avatar Oct 20 '15 17:10 ded

Done. I reduced the amount of changed files now. And rebased to current master, just to be on the safe side.

Calamari avatar Oct 20 '15 21:10 Calamari

+1

danbovey avatar Dec 22 '15 16:12 danbovey

@ded xmas ping! :)

joaocunha avatar Dec 23 '15 17:12 joaocunha

We've monkey-patched our version of reqwest (@Plangrid) to incorporate this change. Any chance it gets merged into the official version? @ded :)

calcsam avatar May 04 '16 19:05 calcsam

Just hit this today (for CSRF) and would also love to see this merged.

nilliams avatar Aug 02 '16 10:08 nilliams