38 lines
		
	
	
		
			889 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			38 lines
		
	
	
		
			889 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| 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()
 |