Hi @Yu Kawasaki
Welcome to Microsoft Q&A! Thanks for posting the question.
I see that you are trying to return content of 2 files (a html doc and a script file) as a response from Python Azure Function. Please note the signature of azure.functions.HttpResponse
constructor as available here: HttpResponse Class:
HttpResponse(body=None, *, status_code=None, headers=None, mimetype=None, charset=None)
As a response, you may only return one value which is the body (). In the code snippet as shared above, you are only reading the html file (filename = f'HttpTrigger1/test.html') as text. This will only get the content of file itself and not the dependent resource (here test.js). You may want to read the content from both the file individually, append the content into a single string and then return it back as a string.
Please let me know if you have any questions.
---
Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.