this works
procedure OnAsyncSuccess(r: IRESTResponse);
var
ed: TovEmoData;
e: TovEmo;
begin
try
ed := Mapper.JSONObjectToObject<TovEmoData>(r.BodyAsJsonObject);
e := TovEmo.Create(ed);
try
Form1.memo_log.Lines.Text := IntToStr(e.Visi_Id) + '.' + e.Emo_Note;
finally
e.Free
end;
ed.Free;
except
ShowMessage('error')
end;
end;
procedure OnAsyncError(e: Exception);
begin
ShowMessage('error');
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
RESTClient.Asynch(OnAsyncSuccess, OnAsyncError, nil, true).doGET('/emo', ['285063'])
end;
this does not work
procedure OnAsyncSuccess(r: IRESTResponse);
var
ed: TovEmoData;
e: TovEmo;
begin
try
ed := Mapper.JSONObjectToObject<TovEmoData>(r.BodyAsJsonObject);
e := TovEmo.Create(ed);
try
Form1.memo_log.Lines.Text := IntToStr(e.Visi_Id) + '.' + e.Emo_Note;
finally
e.Free
end;
ed.Free;
except
ShowMessage('error')
end;
end;
procedure OnAsyncError(e: Exception);
begin
ShowMessage(e.message);
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
RESTClient.Asynch(OnAsyncSuccess, OnAsyncError, nil, true).doGET('/emo', ['285063'])
end;
only the procedure OnAsyncError is different
Original issue reported on code.google.com by stefano....@gmail.com on 28 Aug 2014 at 8:19
Original issue reported on code.google.com by
stefano....@gmail.com
on 28 Aug 2014 at 8:19