Summary

Completed

In this module, you learned how to connect to an external REST service by using HTTP. Application language (AL) has some built-in HTTP data types available. You can start with the HttpClient data type and use the Get, Post, Put, Delete, or Send functions to retrieve or send data.

REST allows you to send text or streams through the HttpContent data type. You can use the WriteFrom function to put data in the HttpContent variable so you can send it to the external service, or you can use the ReadAs function to read the response from a service.

The service often returns a JSON document. AL has support for some JSON data types. The JsonToken data type is the base data type. It's important to remember that these different data types are all reference types, not value types.