Reactive-Extensions / RxJS-DOM

HTML DOM Bindings for the Reactive Extensions for JavaScript
http://reactivex.io
Other
438 stars 101 forks source link

Documentantion of Rx.DOM.ajax is incorrect #137

Open dmnrmr opened 6 years ago

dmnrmr commented 6 years ago

It says that you either pass a url: string or a settings: Object when in reality it is this:

get(url: string, headers?: Object): Observable<AjaxResponse>;

Also how can you set responseType (which defaults to json) when you can't pass any options?

whiteinge commented 6 years ago

The docs are correct: https://github.com/Reactive-Extensions/RxJS-DOM/blob/35271e7/src/ajax/ajax.js#L220-L228

If you need to specify responseType then you'll need to pass an object and not a string.

dmnrmr commented 6 years ago

It was very stupid of me trying to pass settings to ajax.get method. Case closed.