You can use the built-in HTTP data types to get data from external REST services from within Dynamics 365 Business Central. In this module, you'll learn about these data types and how to work with JSON data in AL.
Learning objectives
In this module, you will:
- Use HTTP data types.
- Connect to external REST services and read data.
- Connect to external REST services and post data.
- Read JSON data in Business Central.
- Get JSON from an external REST service.
Application language (AL) in Dynamics 365 Business Central has several data types, such as text, code, integer, and option. Application language also supports HTTP data types.
You can't create a field in a table of an HTTP data type, but you can create variables in code. Application language supports a set of HTTP classes for sending and receiving data from HTTP services. These classes are an implementation of the System.Net.Http classes from the .NET Framework. The available classes are:
HttpClient
HttpContent
HttpHeaders
HttpRequestMessage
HttpResponseMessage
All HTTP types are reference types, not value types, which you'll learn how to use in your own AL code.
No comments:
Post a Comment