Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bloodhound AJAX options are missing - POST not possible #1181

Closed
onemenny opened this issue Apr 26, 2015 · 5 comments
Closed

bloodhound AJAX options are missing - POST not possible #1181

onemenny opened this issue Apr 26, 2015 · 5 comments
Milestone

Comments

@onemenny
Copy link

v0.11.0 omitted the ajax options for prefetch and remote, it seems that the 'GET' is now hardcoded.
how can a POST operation be preformed?

@jharding
Copy link
Contributor

You'll want to use the prepare option. This change was made to make things more generic so the transport mechanism could be swapped out. Here's an example of how you'd do it:

function prepare(query, settings) {
  settings.type = 'POST';
  return settings;
}

var b = new Bloodhound({
  remote: {
    // ...
    prepare: prepare
  }
});

@onemenny
Copy link
Author

but that option is missing from prefetch...

@jharding
Copy link
Contributor

That it is... woops. I'll get that fixed for v0.11.1 (will probably be released tomorrow). Thanks for the report.

@jharding jharding reopened this Apr 26, 2015
@jharding jharding added this to the v0.11.1 milestone Apr 26, 2015
@onemenny
Copy link
Author

thanks, will be waiting for that

@jharding
Copy link
Contributor

PR is up, see #1184. I'll get it merged into integration-0.11.1 tomorrow before I do the release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants