web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Business Central forum

REST POST-services http-client

(0) ShareShare
ReportReport
Posted on by
I'm trying to use a REST POST-service in AL. I received the http-request in f.e. flow, but I could not use the content in the next steps in flow. Any ideas?
    local procedure CreatePost(firstvar: Text, secondvar: Text)
    var
        client: Httpclient;
        responseMessage: HttpResponseMessage;
        content: HttpContent;
        object: JsonObject;
        objectText: Text;
    begin
        object.Add('Example1', firstvar);
        object.Add('Example2', secondvar);
        object.WriteTo(objectText);
        content.WriteFrom(objectText);
        if not client.Post('uri', content, responseMessage) then
            Error('The call to the web service failed');
Categories:

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Business Central

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans