web request failures in curl
This can happen because of network or connection issues.
You have to find out where the issue is coming from.

First try connecting through a mobile or a 4G connection to see if the issue is in your machine or the local network.
If the issue is with the machine, try disabling firewalls, Anti-virus programs etc to find the root of problem.
It can happen because of an incorrect IP v6 configuration. Try disabling IPv6 locally.
Go to System Preferences &gt; Network  &gt; TCP/IP &gt; Change Configure IPv6 to Link-local only.
If you have access to the router, try disabling IPv6 network. If that solves the issue, then there's a misconfiguration on router.
After you found the cause, fix it and enable firewalls and anti-virus programs.