How to Implement JavaScript for Custom API Calls Using POST in Power Platform?
Table of Contents
Question
A company uses Microsoft Power Platform.
You create a custom action to perform business logic that involves back-end and front-end processes
You need to implement JavaScript that executes the action by using the Web API.
Which HTTP method should you use?
Select only one answer.
A. GET
B. PUT
C. POST
D. PATCH
Answer
C. POST
Explanation
This item tests the candidate’s knowledge of how the Web API works with custom actions.
POST is used to send data to a server. POST does also allow input in the body to be sent with the request. This is needed for custom actions because a complex object must be sent.
GET is used only when data is retrieved. In the case of a custom action, code is executed, which could change the data. In addition, GET does not allow body to be sent in the request. All parameters need to be in the URL, which does not work for custom actions.
PATCH is used to update an existing record. Because custom actions do not have to update a record directly, POST is the better option and has been used by Microsoft.
PUT is used to create a new record. In the case of custom actions, we do not want to create a new row. Therefore, Microsoft decided on using POST to execute custom actions.
Microsoft Power Platform Developer PL-400 certification exam practice question and answer (Q&A) dump with detail explanation and reference available free, helpful to pass the Microsoft Power Platform Developer PL-400 exam and earn Microsoft Power Platform Developer PL-400 certification.