I have this code
method Window1.Button_Click(sender: System.Object; e: System.Windows.RoutedEventArgs);
begin
var x := await MyGetData( 'service1.svc/Data/1' );
end;
class function Window1.MyGetData(path: String) : Task<String>;
begin
var response := await client.GetAsync( path );
result := nil;
end;
The parameter to MyGetData is passed as ‘service1.svc/Data/1’. But when the debugger stops in a breakpoint in the MyGetData method, it says the path is nil. But if I display it with a MessageBox.Show, it is correct.