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

xhr request is not properly implemented #4

Open
w-a-b opened this issue May 19, 2020 · 0 comments
Open

xhr request is not properly implemented #4

w-a-b opened this issue May 19, 2020 · 0 comments

Comments

@w-a-b
Copy link

w-a-b commented May 19, 2020

The callback-implementation of adapter-xhr seems to have several issues:

  1. payload.headers is not set on the request (missing something like for(let key in payload.headers){xhr.setRequestHeader(key, payload.headers[key])}).
  2. Instead payload.headers is set on the result-object (res) (where probably e.currentTarget.getAllResponseHeaders() is meant to be set).
  3. setResult is not provided by the invoking apicase.js, so it always fails with "Uncaught TypeError: setResult is not a function at XMLHttpRequest.xhr.onprogress".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant