blob: 17b6f0bab23f09dce7d1f26873ef6edfb165831b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
.Dd December 14, 2024
.Dt LIBHTTPC_REQUEST 3
.Os
.
.Sh NAME
.Nm LibHTTPC_Request
.Nd how
.Xr libhttpc 3
stores HTTP requests
.
.Sh DESCRIPTION
.Xr libhttpc 3
stores requests
as follows:
.Bd -literal -offset indent
struct LibHTTPC_Request
{
char *buf;
char *method;
char *uri;
char *version;
struct LibHTTPC_Header *headers;
char *body;
size_t header_count;
int selfalloc;
int header_selfalloc;
};
.Ed
Let's see
what means
each member:
.Bl -tag
.It char *buf
Pointer to
the buffer
where request
is stored
.It char *method
Pointer to
the method.
It should be equal to
.Ql buf
.It char *uri
Pointer to
the
.Xr uri 7
.It char *version
Pointer to
the HTTP version number
.It struct LibHTTPC_Header *headers
Array of headers
.It char *body
Pointer to
the entity
.It size_t header_count
Length of
.Ql headers
array
.It int header_selfalloc
Set by the
.Xr libhttpc_loadrequest 3
function if
.Dv NULL
was passed to
request_buf argument.
Used by
.Xr libhttpc_request_ 3 .
.It int selfalloc
Set by the
.Xr libhttpc_loadrequest 3
function if
.Ql headers
array was
allocated
by the function
itself.
Used by
.Xr libhttpc_request_ 3 .
.El
.
.Sh SEE ALSO
.Xr libhttpc 3 ,
.Xr libhttpc-alloc 3 ,
.Xr libhttpc_header 3 ,
.Xr libhttpc_loadrequest 3 ,
.Xr libhttpc_request_ 3
.
.Sh AUTHORS
.An Nakidai Perumenei Aq Mt nakidai@disroot.org
|