You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm having some trouble migrating my TTA code from the previous version. It's my understanding that Bloodhound takes a jQuery AJAX Options object; one option changing the default GET to another verb.
I cannot seem to get Typeahead to POST to my endpoint. When I use other options, like 'data', it definitely does use that in a querystring, leading me to believe the object is being considered.
var userInterests = new Bloodhound({
// Tokenizers pulled from the examples; admittedly not sure what they do :)
datumTokenizer: function(d) { return Bloodhound.tokenizers.whitespace(d.value); },
queryTokenizer: Bloodhound.tokenizers.whitespace,
remote: {
url: "/path/to/searchWithPost",
replace: function (url, query) {
// Pulled from Issue #542 to ensure endpoint is not cached by TTA
return url + "#" + query;
},
ajax: {
type: 'POST',
// With 'data', I can watch a GET request to my endpoint with a '?q=' querystring
// Commented, there's no querystring. So I can only deduce this *is* being read.
data: $.param({q: $('#interest-input').val()})
}
}
});
I've only been using Typeahead for a few days as it is, so it's possible I'm missing something basic. Any direction you can point me in would be wonderful.
Thanks!
The text was updated successfully, but these errors were encountered:
Oh wow, what a dumb mistake. Definitely not intended. My guess is a handful of these issues are going to be found with v0.10.0 since it was a major rewrite, so the turnaround for v0.10.1 is going to be pretty short, maybe a week or two. I want to make sure I get these issues resolved ASAP. Thanks for the bug report.
Congrats on the release of 0.10!
I'm having some trouble migrating my TTA code from the previous version. It's my understanding that Bloodhound takes a jQuery AJAX Options object; one option changing the default GET to another verb.
I cannot seem to get Typeahead to POST to my endpoint. When I use other options, like 'data', it definitely does use that in a querystring, leading me to believe the object is being considered.
I've only been using Typeahead for a few days as it is, so it's possible I'm missing something basic. Any direction you can point me in would be wonderful.
Thanks!
The text was updated successfully, but these errors were encountered: