@@ -21,13 +21,14 @@ # error No sockets available! #endif OF_ASSUME_NONNULL_BEGIN -@class OFHTTPServer; @class OFHTTPRequest; @class OFHTTPResponse; +@class OFHTTPServer; +@class OFStream; @class OFTCPSocket; /*! * @protocol OFHTTPServerDelegate OFHTTPServer.h ObjFW/OFHTTPServer.h * @@ -38,14 +39,16 @@ * @brief This method is called when the HTTP server received a request from a * client. * * @param server The HTTP server which received the request * @param request The request the HTTP server received + * @param body A stream to read the body of the request from, if any * @param response The response the server will send to the client */ - (void)server: (OFHTTPServer *)server didReceiveRequest: (OFHTTPRequest *)request + body: (nullable OFStream *)body response: (OFHTTPResponse *)response; @optional /*! * @brief This method is called when the HTTP server's listening socket