Skip to content

Commit 9c5fa9b

Browse files
authored
1 parent 588440f commit 9c5fa9b

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

doc/bloodhound.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,17 @@ When configuring `remote`, the following options are available.
272272
you to transform the remote response before the Bloodhound instance operates
273273
on it. Defaults to the [identity function].
274274

275+
* `transport` – A function with the signature `transport(options, onSuccess, onError)`
276+
that allows you to specify a custom transport:
277+
```javascript
278+
transport: function (options, onSuccess, onError) {
279+
// Modify the options or replace the next line
280+
$.ajax(options)
281+
.done(function(data, textStatus, request) { onSuccess(data); })
282+
.fail(function(request, textStatus, errorThrown) { onError(errorThrown); });
283+
}
284+
```
285+
275286
<!-- section links -->
276287

277288
[identity function]: http://en.wikipedia.org/wiki/Identity_function

0 commit comments

Comments
 (0)