summary refs log tree commit diff
path: root/man/libhttpc_loadrequest.3
blob: d93a78a9aadff0f436721dc0987e8c2453ad6c1b (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
90
.Dd December 13, 2024
.Dt LIBHTTPC_LOADREQUEST 3
.Os
.
.Sh NAME
.Nm LibHTTPC_loadRequest
.Nd parse HTTP request
.
.Sh SYNOPSIS
.In libhttpc/libhttpc.h
.Ft "struct LibHTTPC_Request *"
.Fo LibHTTPC_loadRequest
.Fa "struct LibHTTPC_Request *request_buf"
.Fa "char *buf"
.Fc
.
.Sh DESCRIPTION
.Nm
parses
.Ql buf
and fills a
.Ql struct LibHTTPC_Request .
If
.Ql request_buf
argument
is
.Ql NULL ,
then functon will
allocate buffer
itself.
.
.Sh RETURN VALUES
.Nm
returns pointer to
.Ql request_buf
on success,
or
.Ql NULL
on error.
.
.Pp
If
.Nm
returned
.Ql NULL ,
it could mean
either:
.Bl -bullet
.It
if
.Xr errno 3
is 0
(Success),
it means
that user
hadn't set
.Xr libhttpc-alloc 3 .
.It
If
.Xr errno 3
is not 0,
it means
that some allocation function
has failed.
Read
.Ql ERRORS
section of
.Xr malloc 3
for more information.
.El
.
.Sh SEE ALSO
.Xr libhttpc 3 ,
.Xr libhttpc-alloc 3 ,
.Xr libhttpc_header 3 ,
.Xr libhttpc_request 3
.
.Sh AUTHORS
.An Nakidai Perumenei Aq Mt nakidai@disroot.org
.
.Sh CAVEATS
.Nm
function will
destroy the buffer
while working.
It sets
0 char
on the end
of every string in
.Ql struct LibHTTPC_Request .