qhttpengine icon indicating copy to clipboard operation
qhttpengine copied to clipboard

Create a simple HTTP client

Open droidmonkey opened this issue 8 years ago • 4 comments

It would be great to have a simple HTTP client that is the compliment to the Server. The client would take in a QUrl and create the QTcpSocket and QHttpEngine::Socket to communicate with the server. The client would also automatically handle SSL connections and redirects (with a default maximum).

I am integrating QHttpEngine into KeePassXC to meet Debian library requirements, but the lack of a simple Client module is making it difficult.

droidmonkey avatar Nov 01 '17 02:11 droidmonkey

Note: this will actually require modifying Socket such that it acts as a Request or Response Socket. Right now Socket only parses the Request headers as if it was acting for a Server.

droidmonkey avatar Nov 03 '17 02:11 droidmonkey

Yes, and I would probably consider splitting the class up at that point. There would be a base class Socket and two classes that derive from it, ServerSocket and ClientSocket. That way the common functionality could remain where it is and the parts of the protocol specific to each end would live in their respective classes.

nathan-osman avatar Nov 03 '17 06:11 nathan-osman

If you don't mind I'm going to open several minor issues and suggestions as I learn more about your code. I'd be willing to help fix them as well.

droidmonkey avatar Nov 03 '17 11:11 droidmonkey

Awesome, that sounds great.

nathan-osman avatar Nov 07 '17 06:11 nathan-osman