exam questions

Exam AZ-204 All Questions

View all questions & answers for the AZ-204 exam

Exam AZ-204 topic 1 question 32 discussion

Actual exam question from Microsoft's AZ-204
Question #: 32
Topic #: 1
[All AZ-204 Questions]

HOTSPOT -
You are developing a C++ application that compiles to a native application named process.exe. The application accepts images as input and returns images in one of the following image formats: GIF, PNG, or JPEG.
You must deploy the application as an Azure Function.
You need to configure the function and host json files.
How should you complete the json files? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Hot Area:

Show Suggested Answer Hide Answer
Suggested Answer:
Box 1: "type": "http"
Box 2: "customHandler": { "description":{
A custom handler is defined by configuring the host.json file with details on how to run the web server via the customHandler section.
The customHandler section points to a target as defined by the defaultExecutablePath.
Example:
"customHandler": {
"description": {
"defaultExecutablePath": "handler.exe"
Box 3: "enableForwardingHttpRequest": false
Incorrect:
For HTTP-triggered functions with no additional bindings or outputs, you may want your handler to work directly with the HTTP request and response instead of the custom handler request and response payloads. This behavior can be configured in host.json using the enableForwardingHttpRequest setting.
At the root of the app, the host.json file is configured to run handler.exe and enableForwardingHttpRequest is set to true.
Reference:
https://docs.microsoft.com/en-us/azure/azure-functions/functions-custom-handlers

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
[Removed]
Highly Voted 2 years, 4 months ago
I just hope the real questions are not this deep to know if enableForwardingHttpRequest is true or false. I use Azure functions every day but I never used a custom handler and I hope most people do not have the burning need to use this when there are so many other solutions to handle this.
upvoted 34 times
...
Esward
Highly Voted 2 years ago
HTTP, Custom handler, true are the correct answers
upvoted 10 times
Ody
2 months ago
The `enableForwardingHttpRequest` setting in Azure Functions custom handlers determines how the HTTP request is forwarded to your custom handler. Example Use Cases true - If you have a custom handler written in a language like Go or C++ that expects to handle HTTP requests directly, you would set `enableForwardingHttpRequest` to `true`. false - If your custom handler is designed to process structured data and you want the Azure Functions runtime to handle the HTTP specifics, you would set it to `false`. https://github.com/Azure/azure-functions-host/issues/6462): [Azure Functions custom handlers](https://learn.microsoft.com/en-us/azure/azure-functions/functions-custom-handlers)
upvoted 2 times
...
...
prode
Most Recent 5 days, 1 hour ago
"enableForwardingHttpRequest": true Why? Since the C++ application (process.exe) is a native executable, it cannot directly handle HTTP requests. Azure Functions must forward HTTP requests to the custom handler (C++ app). Setting enableForwardingHttpRequest: true ensures that Azure Functions acts as a proxy, forwarding requests to process.exe for processing. When would enableForwardingHttpRequest: false be used? If the function does not depend on HTTP request details (e.g., input is processed from a queue or blob storage). If the function retrieves input from other bindings instead of HTTP. Since the question clearly states that the function receives images and returns processed images, HTTP request forwarding is required.
upvoted 1 times
...
8ac3742
6 months, 3 weeks ago
“enableForwardingHttpRequest” should be set to true to forward the HTTP request to your custom handler.
upvoted 2 times
...
oskx2
10 months, 3 weeks ago
enableForwardingHttpRequest must be true: Ref: https://learn.microsoft.com/en-us/azure/azure-functions/create-first-function-vs-code-other?tabs=go%2Cwindows In the customHandler section, add a property named enableForwardingHttpRequest and set its value to true. For functions consisting of only an HTTP trigger, this setting simplifies programming by allow you to work with a typical HTTP request instead of the custom handler request payload.
upvoted 2 times
...
manopeydakon
1 year ago
If your C++ application Azure Function does not depend on information from the original HTTP request (like headers, query parameters, etc.), you might set enableForwardingHttpRequest to false to optimize performance and reduce unnecessary data transfer. If your C++ application Azure Function requires information from the original HTTP request, such as headers or query parameters, you might set enableForwardingHttpRequest to true so that the original request is forwarded to your function. So I would say True for this case!
upvoted 3 times
Stel0Papad4
9 months ago
I dont think its {enableForwardingHttpRequest:true} cause it says that it receives images and returns images in a specified format. Input image could differ from the output one. The question is very tricky and bad written but it doesnt say that the the given image is returned back. So my understanding is that the C++ App Azure Function doesnt depend on information from the original HTTP Request. Correct me if im wrong.
upvoted 2 times
...
...
130nk3r5
1 year, 1 month ago
Got this today. Went with answer here. Score 927
upvoted 8 times
...
dddddd111
1 year, 3 months ago
It should be "enableForwardingHttpRequest": true
upvoted 3 times
...
ENGs
1 year, 4 months ago
On my exam 2023-10 before the Update of the Exam
upvoted 2 times
...
jakobste
1 year, 6 months ago
This was on my exam in august 2023.
upvoted 8 times
...
AbidooKing
1 year, 7 months ago
On my exam 2023-07-13- went with "enableForwardingHttpRequest": true. Score 917
upvoted 5 times
...
Gednehm
1 year, 7 months ago
https://learn.microsoft.com/en-us/azure/azure-functions/functions-custom-handlers#, the last one should be true.
upvoted 3 times
...
moota
1 year, 9 months ago
- Your Azure Function will be a custom handler since Azure Functions doesn't directly support C++ as a runtime. - enableForwardingHttpRequest is set to true to allow the custom handler to receive the HTTP request data
upvoted 6 times
...
surprise0011
1 year, 10 months ago
I will go with 'yes' In the function.json file, enableForwardingHttpRequest should be set to true for the Azure Function to accept HTTP requests and forward them to the C++ application for processing. This is because the C++ application is compiled as a native application and cannot directly receive HTTP requests. By setting enableForwardingHttpRequest to true, the Azure Function acts as a proxy and forwards incoming HTTP requests to the C++ application. So the correct option is: "enableForwardingHttpRequest": true
upvoted 5 times
...
Videira
1 year, 11 months ago
On my exam 2023-02-25
upvoted 7 times
...
RonanMatos
1 year, 11 months ago
shit question
upvoted 3 times
...
forgetfulalligator
1 year, 12 months ago
Everything looks gucci except enableforwardhttprequest got to be true. If it was false, our customer handler can receiving any incoming HTTP requests
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago