Now that we've got a frontend that can only return one picture, let's take it to the next level and return FOUR pictures at the same time. To do this, let's edit our old twoCatz function.
✅ Task:
[ ] 1: Make sure you're on the twocatz-frontend branch
[ ] 2: Edit your twoCATZ HTTP Trigger from Week 1 so it takes in 4 parameters (name1, name2, name3, name4) and returns four pictures in base64 with the parameters.
[ ] 3: Remove the "random name" feature in your Azure Function
[ ] 4: Commit twocatz/index.js and test your result with Postman
[ ] 5: Create a pull request to merge twocatz-frontend onto main, and only merge the pull request when the bot approves your changes!
‼️ Requirements
Make sure you encode the pictures in base64
Make sure your parameters are named correctly!
The Function URL should still be in your TWOCATZ_ENDPOINT secret since you are editing the same function
🚧 Test your Work
Open up Postman again since we are testing an API.
⚠️ Make a GET request with the four name parameters. Do you get a JSON object containing name1, name2, name3, and name4 attributes encoded in base64?
:bulb: Having trouble? Look back to old branches - these skills were all used before!
Week 4 Step 6 ⬤⬤⬤⬤⬤⬤◯ | 🕐 Estimated completion: 5-20 minutes
One Cat isn't enough ~ Meow
Now that we've got a frontend that can only return one picture, let's take it to the next level and return FOUR pictures at the same time. To do this, let's edit our old twoCatz function.
✅ Task:
twocatz-frontend
branchname1
,name2
,name3
,name4
) and returns four pictures in base64 with the parameters.twocatz/index.js
and test your result with Postmantwocatz-frontend
ontomain
, and only merge the pull request when the bot approves your changes!‼️ Requirements
TWOCATZ_ENDPOINT
secret since you are editing the same function🚧 Test your Work
Open up Postman again since we are testing an API.
⚠️ Make a GET request with the four name parameters. Do you get a JSON object containing
name1
,name2
,name3
, andname4
attributes encoded in base64?