Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Qhttpserver unable to run on https protocol using ssl.
I am using below code for run Cplusplus RestAPI using "qhttpserver" http server on http protocol. But i want to server run on https protocol. I have spent couple of days to run "qhttpserver" server on https protocols. Please Tell me how we can solve this problem. Reply as soon as possible.
QHttpServer server = new QHttpServer(this);
connect(server, SIGNAL(newRequest(QHttpRequest, QHttpResponse*)),
this, SLOT(handleRequest(QHttpRequest*, QHttpResponse*)));
Do you know if your QHttpServer supports SSL?
QHttpServer is not part of Qt. Where did you get it from? (I found at least 2 different projects containing "QHttpServer": https://github.com/nikhilm/qhttpserver and http://xmelegance.org/qxservlet/classdocs/classQHttpServer.html )
Thanks for reply.
I have post these question to nikhilm github repository.
You are right QHttpServer is not part of Qt. I download these server from https://github.com/nikhilm/qhttpserver. I am trying to solve it. If you got any solution please sent me .
I've never used QHttpServer before, so I don't know much about it, sorry. It's probably best if you ask the author.
I had a quick look at nikhilm's code, but I couldn't find any built-in SSL support. If you want to use HTTPS, you might need to create and manage your own SSL sockets to transfer the HTTP data. See "QSslSocket":http://qt-project.org/doc/qt-5/QSslSocket.html
Thanks lots for contribute and suggest me .
I ask with author. He give me some ssl "#include <QSslSocket>" and library link . and you are right i need create ssl certificate and manage with QHttpserver server so that HTTPS secure socket will we enable.
Thanks again . If i face some problem then i will contact again.
You're welcome. :) Good luck!