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

Calling overrideMimeType throws an unimplemented error #79

Open
morsh opened this issue Feb 5, 2019 · 3 comments
Open

Calling overrideMimeType throws an unimplemented error #79

morsh opened this issue Feb 5, 2019 · 3 comments

Comments

@morsh
Copy link

morsh commented Feb 5, 2019

The following is not implemented and preventing requests from getting responses:

  overrideMimeType(mime: string): void {
    throw notImplementedError;
  }

Is anything being done with this?

@jameslnewell
Copy link
Owner

No efforts that I know of at the moment. Would you consider contributing it?

https://xhr.spec.whatwg.org/#the-overridemimetype()-method

@jameslnewell jameslnewell changed the title calling overrideMimeType throws an error Calling overrideMimeType throws an unimplemented error Feb 19, 2019
@morsh
Copy link
Author

morsh commented Feb 20, 2019

Sorry, I ended up using another solution: https://github.com/berniegp/mock-xmlhttprequest

@csimi
Copy link

csimi commented Aug 19, 2020

As far as I can see, xhr-mock doesn't do any parsing based on the mime type, so implementing this as a noop wouldn't cause any issues. Either way overrideMimeType is generally used to opt out of XML parsing which doesn't happen in this library.

csimi added a commit to csimi/xhr-mock that referenced this issue Aug 24, 2020
csimi added a commit to csimi/xhr-mock that referenced this issue Nov 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants