happy-kitchen-89482
12/30/2022, 2:37 PMhappy-kitchen-89482
12/30/2022, 2:39 PM>>> import requests
>>> response = requests.get(f"<https://api.github.com/repos/pantsbuild/pants/pulls/17867>")
>>> response.status_code
401
happy-kitchen-89482
12/30/2022, 2:39 PM$ curl -s -o /dev/null -w "%{http_code}\n" <https://api.github.com/repos/pantsbuild/pants/pulls/17867>
200
happy-kitchen-89482
12/30/2022, 2:40 PMhappy-kitchen-89482
12/30/2022, 2:43 PMhappy-kitchen-89482
12/30/2022, 2:43 PMhappy-kitchen-89482
12/30/2022, 2:44 PMhundreds-father-404
12/30/2022, 3:19 PMhappy-kitchen-89482
12/30/2022, 3:28 PMhappy-kitchen-89482
12/30/2022, 3:28 PMhundreds-father-404
12/30/2022, 3:31 PMhappy-kitchen-89482
12/30/2022, 3:52 PMwide-midnight-78598
12/30/2022, 10:11 PMhappy-kitchen-89482
12/30/2022, 10:12 PMhundreds-father-404
12/30/2022, 10:13 PMhappy-kitchen-89482
12/30/2022, 10:14 PMwide-midnight-78598
12/30/2022, 10:14 PMrm -rf /
- solves all problemswitty-crayon-22786
01/03/2023, 6:07 PM~/.netrc
?happy-kitchen-89482
01/03/2023, 6:17 PMhappy-kitchen-89482
01/22/2023, 3:32 PM$ ptex <https://api.github.com/repos/pantsbuild/pants/git/refs/tags/release_2.15.0rc2>
Failed to fetch <https://api.github.com/repos/pantsbuild/pants/git/refs/tags/release_2.15.0rc2>: [22] HTTP response code said error (The requested URL returned error: 401)
Fails similarly with requests
in a repl, but works with curl:
$ curl -s -o /dev/null -w "%{http_code}\n" <https://api.github.com/repos/pantsbuild/pants/git/refs/tags/release_2.15.0rc2>
200
happy-kitchen-89482
01/22/2023, 3:35 PMhappy-kitchen-89482
01/22/2023, 3:36 PMhappy-kitchen-89482
01/22/2023, 3:37 PMhappy-kitchen-89482
01/22/2023, 3:37 PMhappy-kitchen-89482
01/22/2023, 3:37 PMwide-midnight-78598
01/22/2023, 3:38 PMhappy-kitchen-89482
01/22/2023, 3:38 PMwide-midnight-78598
01/22/2023, 3:39 PMwide-midnight-78598
01/22/2023, 3:39 PMwide-midnight-78598
01/22/2023, 3:40 PM>>> import requests
>>> requests.get("<https://api.github.com/repos/pantsbuild/pants/git/refs/tags/release_2.15.0rc2>")
<Response [200]>
>>> requests.get("<https://github.com/pantsbuild/pants/releases/download/release_2.15.0rc2/pants.2.15.0rc2.pex>")
<Response [200]>
>>> requests.utils.default_headers()
{'User-Agent': 'python-requests/2.28.1', 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', 'Connection': 'keep-alive'}
happy-kitchen-89482
01/22/2023, 3:42 PMcurl/version
as the user-agenthappy-kitchen-89482
01/22/2023, 3:42 PMhappy-kitchen-89482
01/22/2023, 3:42 PMwide-midnight-78598
01/22/2023, 3:42 PMwide-midnight-78598
01/22/2023, 3:43 PMhappy-kitchen-89482
01/22/2023, 3:43 PMwide-midnight-78598
01/22/2023, 3:43 PMhappy-kitchen-89482
01/22/2023, 3:44 PMhappy-kitchen-89482
01/22/2023, 3:45 PMhappy-kitchen-89482
01/22/2023, 3:45 PMhappy-kitchen-89482
01/22/2023, 3:45 PMwide-midnight-78598
01/22/2023, 3:46 PMhappy-kitchen-89482
01/22/2023, 3:46 PMhappy-kitchen-89482
01/22/2023, 3:47 PMwide-midnight-78598
01/22/2023, 3:47 PMhappy-kitchen-89482
01/22/2023, 3:49 PM