I need better control, so I am trying to create something like this:QuoteI want to move Http::Request and Http::Response classes outside the Http.hpp fileBut why?QuoteMy next task is creating Http::ClientHow will it differ from the current sf::Http class?Quoteand Http::ServerAre you really going to implement an HTTP server? Why?
Before submitting code without explaining anything, why don't you come on the forum to discuss your plans?
what exactly cannot be achieved with the current API?I can do what I want by using raw bytes, but I need something higher-level than this and lower-level than current code for HTTP.
Maybe it will be easier to manage HTTP requests and responses via packets? I am talking about sf::Http::Request and sf::Http::Response inherited from sf::Packet and prepared to manage data as other packets.HTTP requests and responses are text based. sf::Packet deals with binary data. So it doesn't look like we could get something interesting by mixing both :P
HTTP requests and responses are text based. sf::Packet deals with binary data.Both are streams based, so it should be possible to access requests and responses by streams (of course higher-level than raw bytes streams and not binary data).
what you suggest? "Stream" is a very vague wordCurrent sf::Http class uses HTTP requests and responses instead of raw bytes. I am trying to create general code to replace raw bytes by requests and responses (it may be useful not only for HTTP connections).
Please show an example of what your code can do that is not possible with the current API.If you are sending raw bytes, current API can do everything, but current HTTP Client cannot:
use case sensitive fieldshttp://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2
Field names are case-insensitive.Field values are already treated in a case-sensitive manner by SFML, so I do not understand this point.
Just to provide the connection: What you are suggesting for the HTTP side of things is the topic of the discussion here as well.Yes, I am trying to provide the connection. Thanks for link, I have not read this topic before.
Field names are case-insensitive.OK, I agree. Thanks for link, I thought they are case sensitive.
It can be done in your own code and SFML doesn't have to provide empty interfacesIf SFML will support more than simple HTTP and FTP clients, I think some code will be the same for each client (for example it may be connecting). Then, a new classes doing this will be necessary to avoid repeating code.
Have you made extensive use of the SFML network module before suggesting all of this?I was using sf::Http::Client as long as I could. Later, when I had some problems with fields, I started to use sf::TcpSocket. Then, I had problems with receiving data. Now I am trying to implement communication (one send == one receive, something like in packets, but text-based and suitable for all TCP connections).
There are already many client and server applications that have been made with SFML even without these additions.I hope I will find something useful during reading their source.