diff --git a/April21/Functions/HttpFunctions/__pycache__/main.cpython-38.pyc b/April21/Functions/HttpFunctions/__pycache__/main.cpython-38.pyc new file mode 100644 index 0000000..ac6d0e9 Binary files /dev/null and b/April21/Functions/HttpFunctions/__pycache__/main.cpython-38.pyc differ diff --git a/April21/Functions/HttpFunctions/main.py b/April21/Functions/HttpFunctions/main.py new file mode 100644 index 0000000..2a26aab --- /dev/null +++ b/April21/Functions/HttpFunctions/main.py @@ -0,0 +1,9 @@ + +def hello_http(request): + request_json = request.get_json() + request_args = request.args + if request_json and 'name' in request_json: + name = request_json['name'] + else: + name = 'world' + return 'Hello {}!'.format(name) \ No newline at end of file diff --git a/April21/Functions/HttpFunctions/requirements.txt b/April21/Functions/HttpFunctions/requirements.txt new file mode 100644 index 0000000..8ab6294 --- /dev/null +++ b/April21/Functions/HttpFunctions/requirements.txt @@ -0,0 +1 @@ +flask \ No newline at end of file