其他分享
首页 > 其他分享> > REST API 调用新方法

REST API 调用新方法

作者:互联网

RESTDebugger

用这个调用,Copy Components,生成控件,

然后粘贴到工程里。

  RESTRequest1.Execute;  // send request to endpoint     var JSONValue: TJSONValue;   var JSONArray: TJSONArray;   var ArrayElement: TJSONValue;     // after using object we just free them within the Lists   RctList := TList<TRectangle>.Create;   ImgList := TList<TImage>.Create;   LblTitleList := TList<TLabel>.Create;   LblDescpList := TList<TLabel>.Create;     try     JSONValue := TJSONObject.ParseJSONValue(RESTResponse1.Content);     JSONArray := JSONValue.GetValue<TJSONArray>('data');  // articles are stored in the data array in the JSON response   https://blogs.embarcadero.com/how-to-create-a-cross-platform-news-app-with-delphi/  

标签:JSONValue,调用,Create,REST,API,var,TList,data,TJSONValue
来源: https://www.cnblogs.com/cb168/p/15863943.html