-
Notifications
You must be signed in to change notification settings - Fork 286
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
Error: only absolute urls are supported #76
Comments
Same problem |
@gocreating I have already solved the problem of mine. It relates to an issue of my api server configs, not this package's issue :) |
@hoangdo94 It seems that for client side there is no need to give domain name to fetch api, but it is necessary for server side. |
yes, this is correct. i'm not sure it's possible for server side code to guess the correct hostname…? |
So is there any solution for this? |
@ctxhou You can handle it by yourself. Here is my solution (but I have already switched to superagent):
You can reference the complete file in my boilerplate. |
cool, it's one of the solution. Thanks! btw, why you want to change to use superagent? |
@ctxhou Fetch API doesn't support hooks and download/upload progress. So I cannot implement ajax progress bar. That's just my personal reason. |
FYI, just connecting the dots here. This issue relates to node-fetch/node-fetch#75 & swagger-api/swagger-js#1044. |
I don't see why this was closed, it looks like node-fetch fixed the bug in 1.5.3 according to this node-fetch/node-fetch#43... So shouldn't this library update its node-fetch dependency? |
I am also running into this issue. I am running this inside a Docker container, my graphql endpoint is on another Docker container in the same If using non-absolute URLs would pose issues server-side, then an exception should be thrown when the connection actually fails, instead of just throwing an exception before even attempting to use the provided URL to connect. |
What I did to solve that was to install NB: you do need to reinstall all your packages though |
Probably just missing some environment variable. This message is the same if you pass undefined as url to node-fetch |
I noticed this problem when supplying ipv6. |
This also happens when you are trying to get a relative path is My issue is in testing, tests fail because of the above error, which is annoying because now I have a distinction between the browser and the node environment running the tests. This is the stack trace beyond my code:
I understand this is not an issue directly related with |
No description provided.
The text was updated successfully, but these errors were encountered: