showing results for - "calling json rest services with foxpro and wwjsonserviceclient"
Kendall
26 Feb 2020
1url: https://west-wind.com/wconnect/weblog/ShowEntry.blog?id=920
2////
3
4do wwhttp
5do wwJsonSerializer
6
7loProxy = CREATEOBJECT("wwJsonServiceClient")
8
9*** Make the service call
10loAlbums = loProxy.CallService("http://albumviewerswf.west-wind.com/api/albums",
11                               "","GET")
12? loProxy.cErrorMsg
13
14lnCount = loAlbums.Count
15
16* ? loAlbums.Item(1).Titl
17
18FOR EACH loAlbum in loAlbums 
19   ? loAlbum.Title  + ;
20     " by " + loAlbum.Artist.ArtistName + ;
21     " (" +  TRANSFORM(loAlbum.Tracks.Count) + " tracks)"
22   FOR EACH loTrack IN loAlbum.Tracks
23		? "  " + loTrack.SongName
24   ENDFOR
25ENDFOR
26
27