Build RESTful API client example for WASM
-
I was able to build the RESTful API client example for desktop Linux Qt version 6.8.1, but when i tried to build it for WASM (single threaded) I got complaints about missing header files.
fatal error: 'QtNetwork/qrestaccessmanager.h' file not found
I used the network installer to install Qt. Indeed
qrestaccessmanager.h
is not inwasm_singlethread/include/QtNetwork/
nor are any http related header files. The file is found in other adjacent installations. Does that mean that http features are not supported for WASM single threaded builds? -
It appears that all http features are disabled in single threaded web assembly builds as seen here.
qt_feature("http" PUBLIC SECTION "Networking" LABEL "HTTP" PURPOSE "Provides support for the Hypertext Transfer Protocol in QNetworkAccessManager." CONDITION QT_FEATURE_thread
Bummer. Accessing a Restful API from a WASM application seems like a common use case. Other than switching to multithreaded (which requires https) any suggestions on porting the
qrestaccessmanager
to single threaded?