demo: рабочая версия функции с requests, загрузка из архива работает
This commit is contained in:
BIN
Binary file not shown.
@@ -0,0 +1,14 @@
|
||||
import requests
|
||||
|
||||
def main(event, context):
|
||||
try:
|
||||
r = requests.get('https://httpbin.org/get', timeout=3)
|
||||
return {
|
||||
"statusCode": 200,
|
||||
"body": f"Demo OK: {r.status_code}, {r.json().get('url')}"
|
||||
}
|
||||
except Exception as e:
|
||||
return {
|
||||
"statusCode": 500,
|
||||
"body": f"Error: {str(e)}"
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
requests==2.31.0
|
||||
Reference in New Issue
Block a user