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;
client: Httpclient;
responseMessage: HttpResponseMessage;
content: HttpContent;
object: JsonObject;
objectText: Text;
begin
object.Add('Example1', firstvar);
object.Add('Example2', secondvar);
object.Add('Example1', firstvar);
object.Add('Example2', secondvar);
object.WriteTo(objectText);
content.WriteFrom(objectText);
content.WriteFrom(objectText);
if not client.Post('uri', content, responseMessage) then
Error('The call to the web service failed');
Error('The call to the web service failed');
Categories:

Report
All responses (
Answers (