canjs / can-ajax

jQuery-inspired AJAX request library.
https://canjs.com/doc/can-ajax.html
MIT License
5 stars 7 forks source link

add a beforeSend callback #35

Closed pYr0x closed 6 years ago

pYr0x commented 6 years ago

close #34

justinbmeyer commented 6 years ago

Thanks for the PR!

I think it's worth a tiny discussion on what should be in or out of can-ajax. While this PR is fine as it adds so little code, what are our goals around jQuery compatibility? For example, jQuery also supports many more complex options.

pYr0x commented 6 years ago

the same as #30, i want to add a JWT token on the request by using the header Authorization: Bearer 123

justinbmeyer commented 6 years ago

@pYr0x any thoughts about .call(null,?

pYr0x commented 6 years ago

yeah i will change it to the context of options