; HttpRequest Example ; ------------------- Graphics 640,480,0,2 SetBuffer BackBuffer() ; The Khronos Group's list of glTF sample models: a JSON file on GitHub url$="https://raw.githubusercontent.com/KhronosGroup/glTF-Sample-Assets/main/Models/model-index.json" ; Start the request: HttpRequest returns at once, and the answer ; arrives while the program carries on request=HttpRequest(url) ; The first 20 model names, once the answer is in Dim names$(19) count=0 unread=True While Not KeyDown(1) ; Space asks again If KeyHit(57) Then FreeHttpRequest request request=HttpRequest(url) unread=True count=0 EndIf ; HttpStatus is 0 while the request runs, then the HTTP status status=HttpStatus(request) If status=200 And unread Then ; The answer is text: here, a JSON array of models index=ParseJson(HttpText(request)) If index Then count=JsonCount(index) For i=0 To 19 If i