Jump to content

Recommended Posts

Posted

Hello,

I have a Python Script that requests another url. some URLs (like google.com) work, my own not. Here is the code:
 

import requests
response = requests.get("http://8pxtrp24kvius8v8.myfritz.net:8021/consumption")

print("Response code:", response.status_code)

print("Response formatted as text:",response.text)

print("Response formatted in bytes:",response.content)

print("Response Headers:",response.headers)

 

The code seems ok, I can run it e.g. on https://www.educative.io/

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...