rework reinitialization of http_response

This commit is contained in:
F. Duncanh
2024-07-10 16:55:09 -04:00
parent 53ac57dc42
commit 75d64e6b1e
4 changed files with 35 additions and 26 deletions

View File

@@ -10,6 +10,9 @@
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*==============================================================
* modified fduncanh 2024
*/
#ifndef HTTP_RESPONSE_H
@@ -17,7 +20,8 @@
typedef struct http_response_s http_response_t;
http_response_t *http_response_init(const char *protocol, int code, const char *message);
http_response_t *http_response_create();
void http_response_init(http_response_t *response, const char *protocol, int code, const char *message);
void http_response_add_header(http_response_t *response, const char *name, const char *value);
void http_response_finish(http_response_t *response, const char *data, int datalen);