HttpsStatusCodeAttribute not working properly.
-
Hello,
I am looking for some help getting the HTTP status codes from messages I receive from my HTTP server.
auto status = rep->attribute(QNetworkRequest::HttpStatusCodeAttribute);
By using the line above, I am properly receiving replies such as 200 or 204 from the HTTP server when it is compiled as a desktop application. However, when I run it under WebAssembly, the status is always 0 (independent of the actual reply).
According to the description for HttpStatusCodeAttribute (QNetworkRequest class): "If the connection was not HTTP-based, this attribute will not be present". It looks to me that under WebAssembly this is not treated as an HTTP response.
I can see proper communication in WireShark, but the result of
status
variable is incorrect.Any recommendations?
-
Perhaps report a bug? https://bugreports.qt.io
-
@lorn-potter Thank you. I was hoping that I was doing something wrong.
Do you have any recommendations to get the HTTP response status codes any other way?