[ ] 1: Add on to the HTTP Trigger in the previous issue to check if the user’s parameter input of “password” equals letmein.
If it does, output "Access granted."
If it doesn’t equal the correct password, output “Access denied.”
[ ] 🚀 Commit the update function's code in a file named HackerVoice/index.js to the root of the hackervoice branch!
:exclamation: Do not merge the branch!!
🚧 Test your Work
When you paste your Function URL in your browser or make a GET request with Postman with a password parameter of letmein, you should get “Access granted.“. Otherwise, your function should output “Access denied.“.
:exclamation: Make sure you follow the exact response we provided. Access denied. and Access granted.
1: Returning from a function?
Now that we've got the user's result, either Access denied. or Access granted., we have to get it to them somehow. We can do this by returning it in the body of the request!
:bulb: Recall the context.res object we saw in the HTTP Trigger template.
Week 1 Step 5 ⬤⬤⬤⬤⬤◯◯◯◯ | 🕐 Estimated completion: 25-35 minutes
Let me in!
✅ Tasks:
git pull
letmein
.HackerVoice/index.js
to the root of thehackervoice
branch!🚧 Test your Work
When you paste your Function URL in your browser or make a GET request with Postman with a password parameter of letmein, you should get “Access granted.“. Otherwise, your function should output “Access denied.“.
:exclamation: Make sure you follow the exact response we provided.
Access denied.
andAccess granted.
1: Returning from a function?
Now that we've got the user's result, either
Access denied.
orAccess granted.
, we have to get it to them somehow. We can do this by returning it in the body of the request!Place your message to the user in
your_response
!