-
Notifications
You must be signed in to change notification settings - Fork 74
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
Support aurelia-http-client in addition to fetch client #170
Comments
Hi Don, |
Paul - Regarding your question:
So, what would it take to get a similar level of support for http-client? Meaning, just adding the token interceptor to http-client, so that the JWT token is auto-injected in the request made by http-client? Thanks, |
I guess someone else was asking for this also, back in September: |
Also fetch client in current implementations does not deal with timeouts. |
I can't think of a single use case in which fetch is functionally superior to XHR. Unfortunately I can think of numerous cases in which it is less functional. |
In our project we have a use case for file upload using multipart-form data, and this simply will not work using the aurelia Fetch client. I won't go into a detailed explanation, but Fetch will not work correctly with borowsers to send mulipart-form data, because it doesn't set the content-type and boundary value in the request. As a result, this makes it necessary for us to use the aurelia-http-client for this specific call for file upload.
The aurelia-authentication package provides a FetchConfig class for automatically configuring the aurelia-fetch-client with the appropriate token interceptor. We need similar support for the aurelia-http-client, so that the token interceptor can be attached and the auth token injected.
How can we get this support in http-client?
Thanks,
Don
The text was updated successfully, but these errors were encountered: