I need to Send 2 text parameters and a text file (in the body of Request) to a WS Rest using the POST method.
I am testing with the codeunit 1297, that have two functions to add content to the body (AddBodyAsText and .AddBody), but it is not possible to use both simultly since it gives an error:A call to System.IO.FileStream.CopyTo failed with this message: Cannot access a closed Stream.
Object name: 'destination'.
I interpret that the body of the request is closed at the moment that the second AddBody function is invoked
0