django2/app/pyapp/api-client.py
Peter Kotyczka 5da06f86b7 building
2024-04-01 15:44:04 +02:00

10 lines
247 B
Python
Executable File

import requests
endpoint = "https://httpbin.org/status/200"
endpoint = "https://httpbin.org/anything"
endpoint = "http://localhost:8000/api"
get_response = requests.get(endpoint) # HTTP get request
print(get_response.text)
# REST API -> Web API