HTTP_DECODE_URL(3)

NAME
http_decode_url - decodes a percent-encoded null-terminated string

SYNOPSIS

#include <libweb/http.h>

int http_decode_url(const char *url, bool spaces, char **out);

DESCRIPTION
The http_encode_url() function decodes a null-terminated string given by url using percent-encoding as defined by RFC 3986.

RETURN VALUE
On success, zero is returned, and 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.

ERRORS
No errors are defined.

SEE ALSO
http_encode_url(3), libweb_http(7).

COPYRIGHT
Copyright (C) 2023-2024 libweb contributors

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.