Update requests exercise

This commit is contained in:
2024-01-14 00:15:52 +01:00
parent 17d758d75b
commit 72ccded05d
12 changed files with 195 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
#!/usr/bin/env python3
import requests
# from requests.auth import HTTPBasicAuth
# Con esta librería se podría detallar el método llamándolo así:
# auth=HTTPBasicAuth('foo', 'bar')
# Paǵina para practicar autenticación: https://httpbin.org/basic-auth/foo/bar
response = requests.get('https://httpbin.org/basic-auth/foo/bar', auth=('foo', 'bar'))
print(f"\n[+] Código de error: {response.status_code}\n")
print(response.text)