Reactive-Extensions / RxJS

The Reactive Extensions for JavaScript
http://reactivex.io
Other
19.49k stars 2.1k forks source link

IE 11 aborts Observable.ajax PUT cross-domain request #1529

Open MartinKristof opened 6 years ago

MartinKristof commented 6 years ago

Hi, IE 11 ver. 11.0.9600.18837 on Windows Server 2008 R2 Standard aborts PUT Ajax Observable request with cross-domain:

put$(url, body, headers = { 'Content-Type': 'application/json', 'X-Requested-With': 'XMLHttpRequest') {
        return Observable.ajax({ url, body, headers, method: 'PUT', responseType: 'json', crossDomain: true });
    }
snimek obrazovky 2017-11-30 v 14 33 16

Chrome, FF works ok.

Epic:

 action$.ofType(SAVE_STUDENT)
        .filter(() => isUserLoggedIn(getState().userState))
        .switchMap(() => api.saveStudent$(prepareStudentToSave(getState()), getState().userState.apiKey)
            .flatMap(() => [
                studentSaved(),
                addFlashMessage(
                    {
                        message: 'xxx',                          
                    }
                ),
            ])
            .catch(curry(handleFormError$)(null, null, studentSavedWithError))
        );

Thank you for help.

MartinKristof commented 6 years ago

Works ok, sorry, problem were in other code ->: Observable.from() with any immutable structure throws error. I must convert eg. Immutable List to js with toJS() method. So this is a bug.