summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--man/libhttpc_dumpheader.333
-rw-r--r--man/libhttpc_dumpmethod.332
-rw-r--r--man/libhttpc_dumpresponse.389
-rw-r--r--man/libhttpc_dumpstatus.328
-rw-r--r--man/libhttpc_header.3157
-rw-r--r--man/libhttpc_headertype.3145
-rw-r--r--man/libhttpc_loadheader.333
-rw-r--r--man/libhttpc_loadmethod.332
-rw-r--r--man/libhttpc_loadrequest.390
-rw-r--r--man/libhttpc_method.321
-rw-r--r--man/libhttpc_request.312
-rw-r--r--man/libhttpc_request_.344
-rw-r--r--man/libhttpc_response.377
-rw-r--r--man/libhttpc_status.313
14 files changed, 564 insertions, 242 deletions
diff --git a/man/libhttpc_dumpheader.3 b/man/libhttpc_dumpheader.3
new file mode 100644
index 0000000..f048976
--- /dev/null
+++ b/man/libhttpc_dumpheader.3
@@ -0,0 +1,33 @@
+.Dd December 13, 2024
+.Dt LIBHTTPC_DUMPHEADER 3
+.Os
+.
+.Sh NAME
+.Nm LibHTTPC_dumpHeader
+.Nd convert
+.Xr libhttpc_headertype 3
+to string
+.
+.Sh SYNOPSIS
+.In libhttpc/libhttpc.h
+.Ft "const char *"
+.Fn LibHTTPC_dumpHeader "enum LibHTTPC_HeaderType header"
+.
+.Sh DESCRIPTION
+.Nm
+converts
+.Ql enum LibHTTPC_HeaderType
+to
+.Ql const char * .
+To view
+all available headers,
+check
+.Xr libhttpc_headertype 3 .
+.
+.Sh SEE ALSO
+.Xr libhttpc 3 ,
+.Xr libhttpc_header 3 ,
+.Xr libhttpc_headertype 3
+.
+.Sh AUTHORS
+.An Nakidai Perumenei Aq Mt nakidai@disroot.org
diff --git a/man/libhttpc_dumpmethod.3 b/man/libhttpc_dumpmethod.3
new file mode 100644
index 0000000..9a71524
--- /dev/null
+++ b/man/libhttpc_dumpmethod.3
@@ -0,0 +1,32 @@
+.Dd December 13, 2024
+.Dt LIBHTTPC_DUMPMETHOD 3
+.Os
+.
+.Sh NAME
+.Nm LibHTTPC_dumpMethod
+.Nd convert
+.Xr libhttpc_method 3
+to string
+.
+.Sh SYNOPSIS
+.In libhttpc/libhttpc.h
+.Ft "const char *"
+.Fn LibHTTPC_dumpMethod "enum LibHTTPC_Method header"
+.
+.Sh DESCRIPTION
+.Nm
+converts
+.Ql enum LibHTTPC_Method
+to
+.Ql const char * .
+To view
+all available methods,
+check
+.Xr libhttpc_method 3 .
+.
+.Sh SEE ALSO
+.Xr libhttpc 3 ,
+.Xr libhttpc_method 3
+.
+.Sh AUTHORS
+.An Nakidai Perumenei Aq Mt nakidai@disroot.org
diff --git a/man/libhttpc_dumpresponse.3 b/man/libhttpc_dumpresponse.3
new file mode 100644
index 0000000..f9b53e1
--- /dev/null
+++ b/man/libhttpc_dumpresponse.3
@@ -0,0 +1,89 @@
+.Dd December 13, 2024
+.Dt LIBHTTPC_DUMPRESPONSE 3
+.Os
+.
+.Sh NAME
+.Nm LibHTTPC_dumpResponse ,
+.Nm LibHTTPC_writeResponse
+.Nd save
+.Xr libhttpc_response 3
+.
+.Sh SYNOPSIS
+.In libhttpc/libhttpc.h
+.Ft "char *"
+.Fo LibHTTPC_dumpResponse
+.Fa "struct LibHTTPC_Response *response"
+.Fa "char *buf"
+.Fa "size_t buf_len"
+.Fc
+.Ft int
+.Fo "LibHTTPC_writeResponse"
+.Fa "int sockfd"
+.Fa "struct LibHTTPC_Response *response"
+.Fc
+.
+.Sh DESCRIPTION
+.Nm
+combines
+contents of
+.Ql response
+in the
+.Ql buf .
+.
+.Pp
+.Nm LibHTTPC_writeResponse
+function writes
+.Ql response
+to the
+.Ql sockfd .
+.
+.Pp
+Both functions can
+autocomplete responses.
+If
+.Ql version
+is
+.Ql NULL ,
+then it will
+be set to
+.Ql "HTTP/1.1" .
+If
+.Ql status
+is 0,
+then it will
+be set to
+200.
+If
+.Ql phrase
+is
+.Ql NULL ,
+then it will
+be set to
+.Ql LibHTTPC_dumpStatus(status) .
+.
+.Sh RETURN VALUES
+.Nm LibHTTPC_writeResponse
+will return 1
+if cannot send
+response.
+Read
+.Ql ERRORS
+section of
+.Xr send 2
+for more information.
+.
+.Sh SEE ALSO
+.Xr libhttpc 3 ,
+.Xr libhttpc_header 3 ,
+.Xr libhttpc_status 3 ,
+.Xr libhttpc_response 3
+.
+.Sh AUTHORS
+.An Nakidai Perumenei Aq Mt nakidai@disroot.org
+.
+.Sh CAVEATS
+.Nm
+may edit fields of
+.Ql response
+that are set to
+0
diff --git a/man/libhttpc_dumpstatus.3 b/man/libhttpc_dumpstatus.3
new file mode 100644
index 0000000..2651ec8
--- /dev/null
+++ b/man/libhttpc_dumpstatus.3
@@ -0,0 +1,28 @@
+.Dd December 13, 2024
+.Dt LIBHTTPC_DUMPSTATUS 3
+.Os
+.
+.Nm LibHTTPC_dumpStatus
+.Nd convert
+.Xr libhttpc_status 3
+to string
+.
+.Sh SYNOPSIS
+.In libhttpc/libhttpc.h
+.Ft "const char *"
+.Fn LibHTTPC_dumpStatus "enum LibHTTPC_Status status"
+.
+.Sh DESCRIPTION
+.Nm
+returns
+usually used
+phrase
+for given
+.Xr libhttpc_status 3 .
+.
+.Sh SEE ALSO
+.Xr libhttpc 3 ,
+.Xr libhttpc_status 3
+.
+.Sh AUTHORS
+.An Nakidai Perumenei Aq Mt nakidai@disroot.org
diff --git a/man/libhttpc_header.3 b/man/libhttpc_header.3
index 728de22..135b43e 100644
--- a/man/libhttpc_header.3
+++ b/man/libhttpc_header.3
@@ -4,14 +4,7 @@
 .
 .Sh NAME
 .Nm LibHTTPC_Header
-.Nd HTTP header
-.
-.Sh SYNOPSIS
-.In libhttpc/libhttpc.h
-.Ft "const char *"
-.Fn LibHTTPC_dumpHeader "enum LibHTTPC_HeaderType header"
-.Ft "enum LibHTTPC_HeaderType"
-.Fn LibHTTPC_loadHeader "const char *header"
+.Nd HTTP header structure
 .
 .Sh DESCRIPTION
 HTTP/1.1
@@ -19,14 +12,13 @@ comes with
 some headers.
 .Xr libhttpc 3
 provides
-QoL functions
-for converting them
-between
-user-readable strings
-and machine-readable enum.
+enum
+and QoL functions
+for using them.
 .
-.Sh HEADERS
-Headers are declared
+.Pp
+Library declare
+.Nm
 as follows:
 .Bd -literal -offset indent
 struct LibHTTPC_Header
@@ -36,138 +28,11 @@ struct LibHTTPC_Header
 };
 .Ed
 .
-.Sh HEADER TYPE
-In addition
-to the structure,
-.Xr libhttpc 3
-provides
-a list
-of HTTP/1.1 headers
-as enum.
-.
-.Ss General headers
-.Bl -tag
-.It Dv LibHTTPC_Header_CACHE_CONTROL
-Cache-Control
-.It Dv LibHTTPC_Header_CONNECTION
-Connection
-.It Dv LibHTTPC_Header_DATE
-Date
-.It Dv LibHTTPC_Header_PRAGMA
-Pragma
-.It Dv LibHTTPC_Header_TRAILER
-Trailer
-.It Dv LibHTTPC_Header_TRANSFER_ENCODING
-Transfer-Encoding
-.It Dv LibHTTPC_Header_UPGRADE
-Upgrade
-.It Dv LibHTTPC_Header_VIA
-Via
-.It Dv LibHTTPC_Header_WARNING
-Warning
-.El
-.
-.Ss Request headers
-.Bl -tag
-.It Dv LibHTTPC_Header_ACCEPT
-Accept
-.It Dv LibHTTPC_Header_ACCEPT_CHARSET
-Accept-Charset
-.It Dv LibHTTPC_Header_ACCEPT_ENCODING
-Accept-Encoding
-.It Dv LibHTTPC_Header_ACCEPT_LANGUAGE
-Accept-Language
-.It Dv LibHTTPC_Header_AUTHORIZATION
-Authorization
-.It Dv LibHTTPC_Header_EXPECT
-Expect
-.It Dv LibHTTPC_Header_FROM
-From
-.It Dv LibHTTPC_Header_HOST
-Host
-.It Dv LibHTTPC_Header_IF_MATCH
-If-Match
-.It Dv LibHTTPC_Header_IF_MODIFIED_SINCE
-If-Modified-Since
-.It Dv LibHTTPC_Header_IF_NONE_MATCH
-If-None-Match
-.It Dv LibHTTPC_Header_IF_RANGE
-If-Range
-.It Dv LibHTTPC_Header_IF_UNMODIFIED_SINCE
-If-Unmodified-Since
-.It Dv LibHTTPC_Header_MAX_FORWARDS
-Max-Forwards
-.It Dv LibHTTPC_Header_PROXY_AUTHORIZATION
-Proxy-Authorization
-.It Dv LibHTTPC_Header_RANGE
-Range
-.It Dv LibHTTPC_Header_REFERER
-Referer
-.It Dv LibHTTPC_Header_TE
-TE
-.It Dv LibHTTPC_Header_USER_AGENT
-User-Agent
-.El
-
-.Ss Response headers
-.Bl -tag
-.It Dv LibHTTPC_Header_ACCEPT_RANGES
-Accept-Ranges
-.It Dv LibHTTPC_Header_AGE
-Age
-.It Dv LibHTTPC_Header_ETAG
-ETag
-.It Dv LibHTTPC_Header_LOCATION
-Location
-.It Dv LibHTTPC_Header_PROXY_AUTHENTICATE
-Proxy-Authorization
-.It Dv LibHTTPC_Header_RETRY_AFTER
-Retry-After
-.It Dv ibHTTPC_Header_SERVER
-Server
-.It Dv ibHTTPC_Header_VARY
-Vary
-.It Dv ibHTTPC_Header_WWW_AUTHENTICATE
-WWW-Authenticate
-.El
-.
-.Ss Entity headers
-.Bl -tag
-.It Dv LibHTTPC_Header_ALLOW
-Allow
-.It Dv LibHTTPC_Header_CONTENT_ENCODING
-Content-Encoding
-.It Dv LibHTTPC_Header_CONTENT_LANGUAGE
-Content-Language
-.It Dv LibHTTPC_Header_CONTENT_LENGTH
-Content-Length
-.It Dv LibHTTPC_Header_CONTENT_LOCATION
-Content-Location
-.It Dv LibHTTPC_Header_CONTENT_MD5
-Content-MD5
-.It Dv LibHTTPC_Header_CONTENT_RANGE
-Content-Range
-.It Dv LibHTTPC_Header_CONTENT_TYPE
-Content-Type
-.It Dv LibHTTPC_Header_EXPIRES
-Expires
-.It Dv LibHTTPC_Header_LAST_MODIFIED
-Last-Modified
-.El
-
-.Ss Other headers
-Also,
-there's
-a special
-.Dv LibHTTPC_Header_EXTENSION_HEADER
-header type
-that means
-user-defined
-header
-(as of HTTP/1.1).
-.
 .Sh SEE ALSO
-.Xr libhttpc 3
+.Xr libhttpc 3 ,
+.Xr libhttpc_headertype 3 ,
+.Xr libhttpc_dumpheader 3 ,
+.Xr libhttpc_loadheader 3
 .
 .Sh AUTHORS
 .An Nakidai Perumenei Aq Mt nakidai@disroot.org
diff --git a/man/libhttpc_headertype.3 b/man/libhttpc_headertype.3
new file mode 100644
index 0000000..699e7e4
--- /dev/null
+++ b/man/libhttpc_headertype.3
@@ -0,0 +1,145 @@
+.Dd December 13, 2024
+.Dt LIBHTTPC_HEADER 3
+.Os
+.
+.Sh NAME
+.Nm LibHTTPC_HeaderType
+.Nd HTTP header type
+.
+.Sh DESCRIPTION
+.Xr libhttpc 3
+provides
+a list
+of HTTP/1.1 headers
+as enum with following
+constants:
+.
+.Ss General headers
+.Bl -tag
+.It Dv LibHTTPC_Header_CACHE_CONTROL
+Cache-Control
+.It Dv LibHTTPC_Header_CONNECTION
+Connection
+.It Dv LibHTTPC_Header_DATE
+Date
+.It Dv LibHTTPC_Header_PRAGMA
+Pragma
+.It Dv LibHTTPC_Header_TRAILER
+Trailer
+.It Dv LibHTTPC_Header_TRANSFER_ENCODING
+Transfer-Encoding
+.It Dv LibHTTPC_Header_UPGRADE
+Upgrade
+.It Dv LibHTTPC_Header_VIA
+Via
+.It Dv LibHTTPC_Header_WARNING
+Warning
+.El
+.
+.Ss Request headers
+.Bl -tag
+.It Dv LibHTTPC_Header_ACCEPT
+Accept
+.It Dv LibHTTPC_Header_ACCEPT_CHARSET
+Accept-Charset
+.It Dv LibHTTPC_Header_ACCEPT_ENCODING
+Accept-Encoding
+.It Dv LibHTTPC_Header_ACCEPT_LANGUAGE
+Accept-Language
+.It Dv LibHTTPC_Header_AUTHORIZATION
+Authorization
+.It Dv LibHTTPC_Header_EXPECT
+Expect
+.It Dv LibHTTPC_Header_FROM
+From
+.It Dv LibHTTPC_Header_HOST
+Host
+.It Dv LibHTTPC_Header_IF_MATCH
+If-Match
+.It Dv LibHTTPC_Header_IF_MODIFIED_SINCE
+If-Modified-Since
+.It Dv LibHTTPC_Header_IF_NONE_MATCH
+If-None-Match
+.It Dv LibHTTPC_Header_IF_RANGE
+If-Range
+.It Dv LibHTTPC_Header_IF_UNMODIFIED_SINCE
+If-Unmodified-Since
+.It Dv LibHTTPC_Header_MAX_FORWARDS
+Max-Forwards
+.It Dv LibHTTPC_Header_PROXY_AUTHORIZATION
+Proxy-Authorization
+.It Dv LibHTTPC_Header_RANGE
+Range
+.It Dv LibHTTPC_Header_REFERER
+Referer
+.It Dv LibHTTPC_Header_TE
+TE
+.It Dv LibHTTPC_Header_USER_AGENT
+User-Agent
+.El
+
+.Ss Response headers
+.Bl -tag
+.It Dv LibHTTPC_Header_ACCEPT_RANGES
+Accept-Ranges
+.It Dv LibHTTPC_Header_AGE
+Age
+.It Dv LibHTTPC_Header_ETAG
+ETag
+.It Dv LibHTTPC_Header_LOCATION
+Location
+.It Dv LibHTTPC_Header_PROXY_AUTHENTICATE
+Proxy-Authorization
+.It Dv LibHTTPC_Header_RETRY_AFTER
+Retry-After
+.It Dv ibHTTPC_Header_SERVER
+Server
+.It Dv ibHTTPC_Header_VARY
+Vary
+.It Dv ibHTTPC_Header_WWW_AUTHENTICATE
+WWW-Authenticate
+.El
+.
+.Ss Entity headers
+.Bl -tag
+.It Dv LibHTTPC_Header_ALLOW
+Allow
+.It Dv LibHTTPC_Header_CONTENT_ENCODING
+Content-Encoding
+.It Dv LibHTTPC_Header_CONTENT_LANGUAGE
+Content-Language
+.It Dv LibHTTPC_Header_CONTENT_LENGTH
+Content-Length
+.It Dv LibHTTPC_Header_CONTENT_LOCATION
+Content-Location
+.It Dv LibHTTPC_Header_CONTENT_MD5
+Content-MD5
+.It Dv LibHTTPC_Header_CONTENT_RANGE
+Content-Range
+.It Dv LibHTTPC_Header_CONTENT_TYPE
+Content-Type
+.It Dv LibHTTPC_Header_EXPIRES
+Expires
+.It Dv LibHTTPC_Header_LAST_MODIFIED
+Last-Modified
+.El
+
+.Ss Other headers
+Also,
+there's
+a special
+.Dv LibHTTPC_Header_EXTENSION_HEADER
+header type
+that means
+user-defined
+header
+(as of HTTP/1.1).
+.
+.Sh SEE ALSO
+.Xr libhttpc 3 ,
+.Xr libhttpc_header 3 ,
+.Xr libhttpc_dumpheader 3 ,
+.Xr libhttpc_loadheader 3
+.
+.Sh AUTHORS
+.An Nakidai Perumenei Aq Mt nakidai@disroot.org
diff --git a/man/libhttpc_loadheader.3 b/man/libhttpc_loadheader.3
new file mode 100644
index 0000000..8516834
--- /dev/null
+++ b/man/libhttpc_loadheader.3
@@ -0,0 +1,33 @@
+.Dd December 13, 2024
+.Dt LIBHTTPC_LOADHEADER 3
+.Os
+.
+.Sh NAME
+.Nm LibHTTPC_loadHeader
+.Nd convert
+string to
+.Xr libhttpc_headertype 3
+.
+.Sh SYNOPSIS
+.In libhttpc/libhttpc.h
+.Ft "enum LibHTTPC_HeaderType"
+.Fn LibHTTPC_loadHeader "const char *header"
+.
+.Sh DESCRIPTION
+.Nm
+converts
+.Ql const char * .
+to
+.Ql enum LibHTTPC_HeaderType
+To view
+all available headers,
+check
+.Xr libhttpc_headertype 3 .
+.
+.Sh SEE ALSO
+.Xr libhttpc 3 ,
+.Xr libhttpc_header 3 ,
+.Xr libhttpc_headertype 3
+.
+.Sh AUTHORS
+.An Nakidai Perumenei Aq Mt nakidai@disroot.org
diff --git a/man/libhttpc_loadmethod.3 b/man/libhttpc_loadmethod.3
new file mode 100644
index 0000000..9b25aa4
--- /dev/null
+++ b/man/libhttpc_loadmethod.3
@@ -0,0 +1,32 @@
+.Dd December 13, 2024
+.Dt LIBHTTPC_LOADMETHOD 3
+.Os
+.
+.Sh NAME
+.Nm LibHTTPC_loadMethod
+.Nd convert
+string to
+.Xr libhttpc_method 3
+.
+.Sh SYNOPSIS
+.In libhttpc/libhttpc.h
+.Ft "enum LibHTTPC_Method"
+.Fn LibHTTPC_loadMethod "const char *header"
+.
+.Sh DESCRIPTION
+.Nm
+converts
+.Ql const char * .
+to
+.Ql enum LibHTTPC_Method
+To view
+all available methods,
+check
+.Xr libhttpc_method 3 .
+.
+.Sh SEE ALSO
+.Xr libhttpc 3 ,
+.Xr libhttpc_method 3
+.
+.Sh AUTHORS
+.An Nakidai Perumenei Aq Mt nakidai@disroot.org
diff --git a/man/libhttpc_loadrequest.3 b/man/libhttpc_loadrequest.3
new file mode 100644
index 0000000..d93a78a
--- /dev/null
+++ b/man/libhttpc_loadrequest.3
@@ -0,0 +1,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 .
diff --git a/man/libhttpc_method.3 b/man/libhttpc_method.3
index 6583416..2d23484 100644
--- a/man/libhttpc_method.3
+++ b/man/libhttpc_method.3
@@ -4,14 +4,7 @@
 .
 .Sh NAME
 .Nm LibHTTPC_Method
-HTTP method
-.
-.Sh SYNOPSIS
-.In libhttpc/libhttpc.h
-.Ft "const char *"
-.Fn LibHTTPC_dumpMethod "enum LibHTTPC_Method method"
-.Ft "enum LibHTTPC_Method"
-.Fn LibHTTPC_loadMethod "const char *method"
+.Nd HTTP method
 .
 .Sh DESCRIPTION
 HTTP/1.1
@@ -19,11 +12,9 @@ comes with
 some methods.
 .Xr libhttpc 3
 provides
-QOL functions
-for converting them
-between
-user-readable strings
-and machine-readable enum.
+enum
+and QoL functions
+for using them.
 .Ss Methods
 These are methods
 that are supported
@@ -53,7 +44,9 @@ there's
 for user-defined methods.
 .
 .Sh SEE ALSO
-.Xr libhttpc 3
+.Xr libhttpc 3 ,
+.Xr libhttpc_dumpmethod 3 ,
+.Xr libhttpc_loadmethod 3
 .
 .Sh AUTHORS
 .An Nakidai Perumenei Aq Mt nakidai@disroot.org
diff --git a/man/libhttpc_request.3 b/man/libhttpc_request.3
index 2fb4a74..d570ce4 100644
--- a/man/libhttpc_request.3
+++ b/man/libhttpc_request.3
@@ -4,14 +4,12 @@
 .
 .Sh NAME
 .Nm LibHTTPC_Request
-.Nd way to store HTTP requests
+.Nd how
+.Xr libhttpc 3
+stores HTTP requests
 .
 .Sh SYNOPSIS
 .In libhttpc/libhttpc.h
-.Ft "struct LibHTTPC_Request *"
-.Fo LibHTTPC_loadRequest
-.Fa "struct LibHTTPC_Request *request_buf"
-.Fa "char *buf"
 .Fc
 .Ft int
 .Fo LibHTTPC_Request_
@@ -137,7 +135,9 @@ you should check
 .Sh SEE ALSO
 .Xr libhttpc 3 ,
 .Xr libhttpc-alloc 3 ,
-.Xr libhttpc_header 3
+.Xr libhttpc_header 3 ,
+.Xr libhttpc_loadrequest 3 ,
+.Xr libhttpc_request_ 3
 .
 .Sh AUTHORS
 .An Nakidai Perumenei Aq Mt nakidai@disroot.org
diff --git a/man/libhttpc_request_.3 b/man/libhttpc_request_.3
new file mode 100644
index 0000000..b1558f4
--- /dev/null
+++ b/man/libhttpc_request_.3
@@ -0,0 +1,44 @@
+.Dd December 13, 2024
+.Dt LIBHTTPC_REQUEST_ 3
+.Os
+.
+.Sh NAME
+.Nm LibHTTPC_Request_
+.Nd
+.Xr libhttpc_request 3
+destructor
+.
+.Sh SYNOPSIS
+.In libhttpc/libhttpc.h
+.Fc
+.Ft int
+.Fo LibHTTPC_Request_
+.Fa "struct LibHTTPC_Request *request"
+.Fc
+.
+.Sh DESCRIPTION
+.Nm
+is a destructor of
+.Xr libhttpc_request 3 .
+It frees array
+if header_selfalloc is set,
+and then frees structure
+if selfalloc is set.
+.
+.Sh RETURN VALUES
+.Nm
+returns either
+-1
+if user hadn't set
+.Xr libhttpc-alloc 3
+or
+.Xr errno 3 .
+.
+.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
diff --git a/man/libhttpc_response.3 b/man/libhttpc_response.3
index 8ce283b..151b9ea 100644
--- a/man/libhttpc_response.3
+++ b/man/libhttpc_response.3
@@ -4,21 +4,9 @@
 .
 .Sh NAME
 .Nm LibHTTPC_Response
-.Nd way to store HTTP responses
-.
-.Sh SYNOPSIS
-.In libhttpc/libhttpc.h
-.Ft "char *"
-.Fo LibHTTPC_dumpResponse
-.Fa "struct LibHTTPC_Response *response"
-.Fa "char *buf"
-.Fa "size_t buf_len"
-.Fc
-.Ft int
-.Fo "LibHTTPC_writeResponse"
-.Fa "int sockfd"
-.Fa "struct LibHTTPC_Response *response"
-.Fc
+.Nd how
+.Xr libhttpc 3
+stores HTTP responses
 .
 .Sh DESCRIPTION
 .Xr libhttpc 3
@@ -67,63 +55,12 @@ Length of
 .Ql header_count
 array
 .
-.Pp
-.Ql LibHTTPC_dumpResponse
-function combines
-contents of
-.Ql response
-in the buffer.
-.
-.Pp
-.Ql LibHTTPC_writeResponse
-function writes
-.Ql response
-to the
-.Ql sockfd .
-.
-.Pp
-Both functions can
-autocomplete responses.
-If
-.Ql version
-is
-.Ql NULL ,
-then it will
-be set to
-.Ql "HTTP/1.1" .
-If
-.Ql status
-is 0,
-then it will
-be set to
-200.
-If
-.Ql phrase
-is
-.Ql NULL ,
-then it will
-be set to
-.Ql LibHTTPC_dumpStatus(status) .
-.
-.Sh ERRORS
-.Ql LibHTTPC_writeResponse
-will return 1
-if cannot send
-response.
-.
 .Sh SEE ALSO
 .Xr libhttpc 3 ,
-.Xr libhttpc_header ,
-.Xr libhttpc_status
+.Xr libhttpc_dumpresponse 3 ,
+.Xr libhttpc_header 3 ,
+.Xr libhttpc_status 3
+.Xr libhttpc_writeresponse 3
 .
 .Sh AUTHORS
 .An Nakidai Perumenei Aq Mt nakidai@disroot.org
-.
-.Sh CAVEATS
-.Ql LibHTTPC_dumpResponse
-and
-.Ql LibHTTPC_writeResponse
-may edit fields of
-.Ql response
-that are set to
-0
diff --git a/man/libhttpc_status.3 b/man/libhttpc_status.3
index b8d5e7f..bcd9159 100644
--- a/man/libhttpc_status.3
+++ b/man/libhttpc_status.3
@@ -5,11 +5,6 @@
 .Nm LibHTTPC_Status
 .Nd HTTP status
 .
-.Sh SYNOPSIS
-.In libhttpc/libhttpc.h
-.Ft "const char *"
-.Fn LibHTTPC_dumpStatus "enum LibHTTPC_Status status"
-.
 .Sh DESCRIPTION
 HTTP/1.1
 comes with
@@ -22,7 +17,13 @@ usually used
 status strings
 by code.
 .
-.Sh STATUSES
+.Pp
+These're
+status codes
+presented
+by the
+.Xr libhttpc 3 :
+.
 .Ss 1xx: Informational
 .Bl -tag
 .It Dv LibHTTPC_Status_CONTINUE = 100