Files
yankee-gnome-fire-consumer/recycle/.trash/RestAPIClient (copy 1).py

38 lines
889 B
Python
Raw Permalink Normal View History

2025-02-06 22:21:31 -05:00
import requests
## https://www.nylas.com/blog/use-python-requests-module-rest-apis/#how-to-use-python-requests
def callGET(url):
print("enter -> callGET()")
print("param / url / ",url)
params = dict(
origin='Chicago,IL',
destination='Los+Angeles,CA',
waypoints='Joplin,MO|Oklahoma+City,OK',
sensor='false',
url2=url
)
headers = {'Accept': 'application/json'}
print("params", params)
response = requests.post("https://osiris.yankee.valorantdigital.com/channel/monthly/games/success/exists", headers=headers, data=params, params=params)
print("response2", response.json())
def callPOST():
print("enter -> callPOST()")
response = requests.post('https://httpbin.org/post', data = {'key':'value'})
print("response", response.json())
callGET("https://embanet.online")
#callPOST()