Getting “TypeError: failed to fetch” when the request hasn't actually failed

前端 未结 5 1743
予麋鹿
予麋鹿 2020-12-01 09:05

I\'m using fetch API within my React app. The application was deployed on a server and was working perfectly. I tested it multiple times. But, suddenly the application stopp

5条回答
  •  时光取名叫无心
    2020-12-01 09:38

    If your are invoking fetch on a localhost server, use non-SSL unless you have a valid certificate for localhost. fetch will fail on an invalid or self signed certificate especially on localhost.

提交回复
热议问题