Views
No views yet
# Make a request to the server's endpoint with the desired URL
try:
response = requests.get(f'{server_url}/api/unlimited-internet?url={url}', headers=requests.utils.default_headers())
# Handle the response from the server
if response.ok:
# If the response is successful, display the result
print(response.content.decode())
else:
# If there's an error, display an appropriate message
print('Error:', response.status_code, response.reason)
except requests.RequestException as e:
# Handle any errors that occur during the request
print('Request failed:', str(e))