-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Catching an exception on Send. This happens when request for HEAD ret… #534
Conversation
…urns 405 Method Not Allowed. Instead of error http status, this may throw an exception. Return false and fallback to link download.
I'm gettin exception (NetworkError) on Chrome and Firefox for some reason. I'm not sure here, but could it be the case that HEAD method is not implemented on the API and thus causing the exception? |
Mind sharing the url you are trying so that i can test it? |
httpbin url you send doesn't throw an exception. This api endpoint for example will throw an exception https://portal.radar.f-secure.com/api/latest/productinfo (works for GET, not HEAD). I'm now more convinced that send throws an exception when certain API doesn't implement HEAD verb. |
hmm, when making a sync request to any url that don't implement CORS support seems to throw an error |
So, is it good to merge it? |
@jimmywarting kindly reminder :) ping :) |
@jimmywarting I would like to ask to for clear comment if you intend to accept this change or not. We rely on the forked project in the npm dependencies in our project right now which I would like to remove. |
Sure. Will try to do it later todayy |
released this with v2.0.2 on npm now |
thanks! |
hi why use a HEAD request,not the GET request replace.If crosed enabled,continue to use blob to download, if not, go to the other side. |
…urns 405 Method Not Allowed. Instead of error http status, this may throw an exception. Return false and fallback to link download.