aboutsummaryrefslogtreecommitdiff
path: root/doc/man3/http_decode_url.3
diff options
context:
space:
mode:
authorXavier Del Campo Romero <xavi.dcr@tutanota.com>2023-11-11 23:56:23 +0100
committerXavier Del Campo Romero <xavi.dcr@tutanota.com>2023-11-12 01:29:55 +0100
commit9e1779eacdbe4f56177efb258f543e8baa9efc4e (patch)
tree31724d2db8c1ea7183526fb3b795ab58659c1ab9 /doc/man3/http_decode_url.3
parent9ac68fd76c43523ea3aa3bcc4f9fef0ac2cee830 (diff)
doc: Add man3 page for http_decode_urldecode-url
Suprisingly, this man page was missing on the 0.1.0 release. The recent signature changes on http_decode_url have already been reflected.
Diffstat (limited to 'doc/man3/http_decode_url.3')
-rw-r--r--doc/man3/http_decode_url.341
1 files changed, 41 insertions, 0 deletions
diff --git a/doc/man3/http_decode_url.3 b/doc/man3/http_decode_url.3
new file mode 100644
index 0000000..777353b
--- /dev/null
+++ b/doc/man3/http_decode_url.3
@@ -0,0 +1,41 @@
+.TH HTTP_DECODE_URL 3 2023-11-11 0.2.0 "libweb Library Reference"
+
+.SH NAME
+http_decode_url \- decodes a percent-encoded null-terminated string
+
+.SH SYNOPSIS
+.LP
+.nf
+#include <libweb/http.h>
+.P
+int http_decode_url(const char *\fIurl\fP, bool \fIspaces\fP, char **\fIout\fP);
+.fi
+
+.SH DESCRIPTION
+The
+.IR http_encode_url ()
+function decodes a null-terminated string given by
+.I url
+using percent-encoding as defined by RFC 3986.
+
+.SH RETURN VALUE
+On success, zero is returned, and
+.I out
+is assigned to a valid pointer to the decoded, null-terminated string.
+On decoding error, a positive integer is returned. On fatal error, a
+negative integer is returned.
+
+.SH ERRORS
+No errors are defined.
+
+.SH SEE ALSO
+.BR http_encode_url (3),
+.BR libweb_http (7).
+
+.SH COPYRIGHT
+Copyright (C) 2023 Xavier Del Campo Romero.
+.P
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU Affero General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.