JSONPlaceholder API Explorer - QuadooScript / QSWinInet
=====================================================

Open WinInetExample.qsproj in the Win32 release version of Quadoo Studio.
Use Project > Start Without Debugging (Ctrl+F5) to build and run it.
The ZIP also includes the verified Win32 build in bin\Win32. Keep its DLLs
beside WinInetExample.exe when running it or copying it to another folder.

The application calls https://jsonplaceholder.typicode.com/ using the native
QSWinInet plug-in. No API key is required. It needs an Internet connection
and the current user's Windows WinINet proxy/TLS configuration.

Try the application
-------------------
1. Leave the user filter at 1 and click Load posts (GET): ten posts appear.
   Clear the filter to load all 100. Select a row to fill the editor.
2. Get post (GET) reads /posts/{Post ID}. Get comments (GET) reads its
   nested /posts/{Post ID}/comments collection into the response viewer.
3. Edit the title/body and author user ID. Create (POST) sends all three
   fields to /posts; the simulated created post normally has ID 101.
4. Replace (PUT) sends id, userId, title and body to /posts/{Post ID}.
   Title only (PATCH) sends only title. Delete (DELETE) sends no body.
5. These writes are simulated. They do NOT change JSONPlaceholder's stored
   data. The list deliberately retains the GET results after writes.
   Get the same post again to see its original server data.
6. Enter 999999 as Post ID and click Get post to see HTTP 404 handling.
   The response body is retained even when the HTTP status is an error.

The UI starts an asynchronous native request and uses RequestTimer
(Interval=100, Enabled=false initially) to check request.Wait(0). It disables
conflicting inputs while busy and enables Cancel request. A timer() uptime
watchdog aborts requests after 15 seconds, and closing the Form closes any
pending request. The watchdog is checked on timer delivery, not a strict
wall-clock guarantee. Native Close() waits for cancellation completion.
Cancellation cannot undo a request the server already received.

Files
-----
WinInetExample.qsproj      Application target and module dependency
ApiForm.quadoo            Designer members, UI handlers and request lifecycle
ApiForm.qform.json        Form, report ListView, Memo viewers and components
ApiClient.quadoo          QSWinInet session, JSON payloads and response helpers
NetworkTests.quadoo       Console integration checks; not part of GUI build
Modules\QSWinInet.dll      Unmodified Win32 release plug-in dependency
bin\Win32\               Built EXE and matching native runtime DLLs

The nonvisual WebPlugin is a QuadooPlugin with Module="QSWinInet.dll".
At runtime the member receives the real native plug-in object. Its Open()
method creates a session, and fetch(session, url, JSON_options) starts an
HTTPS request. This is QuadooScript's fetch intrinsic, not JavaScript fetch.
Headers use the wrapper's QueryHeaders flag; HTTP status requires its
QueryStatusCode flag. Flags are the small WinInetRequest::Flags bit masks
from the implementation, not raw Windows INTERNET_FLAG_* values.

The native raw Headers string may include its terminal NUL; the client
removes terminal NULs before displaying it in a Memo control. ToText()
decodes UTF-8. JSON is serialized by the native plug-in and parsed by
JSONParse(). Result/ResultCode report transport success/HRESULT. Status is
the HTTP code, so an HTTP 404 can still have Result=true.

Distribution
------------
Copy bin\Win32 as a unit. It contains WinInetExample.exe and:
  QuadooForm.dll, QuadooVM.dll, QuadooParser.dll, JSON.dll,
  SimbeyCore.dll, QSWinInet.dll.
Windows supplies WININET.dll and the usual OS libraries. The included
release binaries also depend on the matching x86 Visual C++ 2008 CRT.
Keep architectures consistent. Use matching x64 QSWinInet/runtime binaries
if rebuilding with x64 Studio. No COM registration is required for this
QuadooPlugin deployment. No JSONPlaceholder data is embedded or saved.

Checks
------
NetworkTests.quadoo uses the same client. Run it with QVM.exe from this
project directory, with the matching runtime available. It makes real GET
calls and fictional simulated POST/PUT/PATCH/DELETE calls to JSONPlaceholder.
It checks ID validation, filtering, status/headers, UTF-8/JSON round trips,
all five verbs, non-persistence, and HTTP error handling.

Current scope
-------------
One request at a time; fixed JSONPlaceholder HTTPS base URL; no automatic
retry, login/OAuth, streaming downloads or persistent server storage.
The Form polls native completion rather than requiring script async/await
host integration. The console Send() helper blocks for its bounded wait;
the Form uses Start()/Wait(0)/Finish() instead.

Website walkthrough: http://localhost/qs/wininet.html on the development server.
