-
Notifications
You must be signed in to change notification settings - Fork 3
API GET request
https://github.com/North-Seattle-College/ad440-winter2020-tuesday-repo/issues/61
-
In VSCode login in to azure functions with az login. If azure functions are not installed follow the documentation at: https://docs.microsoft.com/en-us/azure/python/tutorial-vs-code-serverless-python-01
-
Create a GET request with paramaters. req.params.get()
-
Deploy to azure with: func azure functionapp publish < functionappname >
-
Copy url address provided once deployment is finished
To Test:
-
Download and open Postman
-
Paste url address from deployment in the url address. Make sure GET is chosen as method. https://san-zg-fun-usw2-task61.azurewebsites.net/api/getRequest?code=JO0TadDNhDyK85lG67XQhaI5pOcMXM8/9oAweLCdrYFfr096WyuR6w==
-
Under Params in menu bar: type machine in key area type a name in value type machineId in key area type a number in value
-
Make sure code, machine, and machineId are all checked
-
In Body enter an empty JSON file such as: {}
-
Click Send
-
In Response area you will see a validation code and output
-
Login to North Seattle College Microsoft Azure portal and click Resource Group
-
Click on san-zg-feat-usw2-task61
-
Click on san-zg-fun-usw2-task61
-
Click on Monitor in left pane to see the logs