nerdexam
Microsoft

MB-820 · Question #34

A company has a Business Central online environment. You need to create an HTTP GET request that connects to an external REST service. Which solution should you use?

The correct answer is E. HttpClient data type variable. To create an HTTP GET request that connects to an external REST service in a Business Central online environment, the solution to use is the HttpClient data type variable (E). The HttpClient data type in AL language is designed for sending HTTP requests and receiving HTTP…

Integrate Business Central with other applications

Question

A company has a Business Central online environment. You need to create an HTTP GET request that connects to an external REST service. Which solution should you use?

Options

  • AHttpContent data type variable
  • BCodeunit 1299 "Web Request Helper"
  • CCodeunit 5459 "JSON Management"
  • DCodeunit 1297 "Http Web Request Mgt."
  • EHttpClient data type variable

How the community answered

(35 responses)
  • A
    3% (1)
  • C
    3% (1)
  • D
    6% (2)
  • E
    89% (31)

Explanation

To create an HTTP GET request that connects to an external REST service in a Business Central online environment, the solution to use is the HttpClient data type variable (E). The HttpClient data type in AL language is designed for sending HTTP requests and receiving HTTP responses from a resource identified by a URI. This makes it the ideal choice for interfacing with external REST services, as it provides the necessary methods and properties to configure and execute HTTP GET requests, handle the responses, and process the data returned by the REST service. This approach is more direct and flexible compared to using specific codeunits like "Web Request Helper" (B) or "Http Web Request Mgt" (D), which might not provide the same level of control or specificity needed for RESTful interactions.

Topics

#HttpClient#REST API#HTTP GET#web service integration

Community Discussion

No community discussion yet for this question.

Full MB-820 Practice