4 * Copyright (c) 2009 project bchan
6 * This software is provided 'as-is', without any express or implied
7 * warranty. In no event will the authors be held liable for any damages
8 * arising from the use of this software.
10 * Permission is granted to anyone to use this software for any purpose,
11 * including commercial applications, and to alter it and redistribute it
12 * freely, subject to the following restrictions:
14 * 1. The origin of this software must not be misrepresented; you must not
15 * claim that you wrote the original software. If you use this software
16 * in a product, an acknowledgment in the product documentation would be
17 * appreciated but is not required.
19 * 2. Altered source versions must be plainly marked as such, and must not be
20 * misrepresented as being the original software.
22 * 3. This notice may not be removed or altered from any source
32 typedef struct http_t_ http_t;
33 typedef struct http_responsecontext_t_ http_responsecontext_t;
35 IMPORT http_t* http_new();
36 IMPORT VOID http_delete(http_t *http);
37 IMPORT W http_connect(http_t *http, UB *host, W host_len);
38 IMPORT W http_send(http_t *http, UB *bin, W len);
39 IMPORT W http_waitresponseheader(http_t *http);
40 IMPORT W http_getstatus(http_t *http);
41 IMPORT UB* http_getheader(http_t *http);
42 IMPORT W http_getheaderlength(http_t *http);
43 IMPORT http_responsecontext_t* http_startresponseread(http_t *http);
44 IMPORT VOID http_endresponseread(http_t *http, http_responsecontext_t *ctx);
45 IMPORT VOID http_close(http_t *http);
47 IMPORT W http_responsecontext_nextdata(http_responsecontext_t *context, UB **bin, W *len);