mirror of
https://github.com/michivonah/python.git
synced 2025-12-22 20:46:29 +01:00
add simple http request
This commit is contained in:
parent
edb8ed83fe
commit
6f7f14d9fe
1 changed files with 10 additions and 0 deletions
10
api/request.py
Normal file
10
api/request.py
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
# API - Make a request
|
||||||
|
# Michi von Ah - Janaury 2024
|
||||||
|
|
||||||
|
import requests
|
||||||
|
|
||||||
|
endpoint = "https://example.com"
|
||||||
|
|
||||||
|
response = requests.get(endpoint)
|
||||||
|
|
||||||
|
print(response.text)
|
||||||
Loading…
Add table
Add a link
Reference in a new issue