loopj/jquery-tokeninput — pull request #558 by staeke (2013-08-01 21:04:46+00:00)
Title: Introduced onSend callback to be able to modifiy jQuery.ajax parameters....

Hello and thanks for a great lib.

We've been using your tokeninput for some time, but faced a new problem. Depending on what the user searches for we want ti hit different APIs with different query parameters and urls. (If the user starts with # we search by id and otherwise by query). This turned out to be really messy unless there was some kind of hook being able to modify and read the jQuery ajax parameters. So I added a "onSend" hook. I also considered just relying on jQuery's onBeforeSend, but that callback is being call after the data has been mangled into the url which just makes it a lot more hassle for the typical use case. So...would you fancy pulling this commit?