Simplified doc-site generation
[AGL/documentation.git] / docs / 3_Developer_Guides / 6_AFB_Helper_Guide / 3.7.4_URL_Escaping.md
1 ---
2 edit_link: ''
3 title: URL escaping
4 origin_url: >-
5   https://git.automotivelinux.org/src/libafb-helpers/plain/docs/escape.md?h=master
6 ---
7
8 <!-- WARNING: This file is generated by fetch_docs.js using /home/boron/Documents/AGL/docs-webtemplate/site/_data/tocs/devguides/master/afb-helpers-function-references-afb-helpers-book.yml -->
9
10 # Escaping helpers functions reference
11
12 ## char *escape_url(const char *base, const char *path, const char * const *args, size_t *length)
13
14 Escape an `url` and `arguments` and returned it as a string.
15
16 * `base`: representing the FQDN of the url.
17 * `path`: the path to the requested page.
18 * `args`: optionnal array of arguments provided for the GET request.
19 * `length`: length of the returned `url`.
20
21 Returns the escaped `url`.
22
23 ## const char *escape_args(const char * const *args, size_t *length)
24
25 Escape an array of arguments and returned the lenght of the escaped arguments
26 string.
27
28 * `args`: array of arguments provided for the GET request.
29 * `length`: length of the returned `arguments`.
30
31 Returns the escaped `arguments`.
32
33 ## const char *escape_str(const char *str, size_t *length)
34
35 Escape a string and returns it.
36
37 * `str`: the string to escape.
38 * `length`: length of the returned string.
39
40 Returns the escaped string.
41
42 ## const char **unescape_args(const char *args)
43
44 Unescape an argument and returns it.
45
46 * `args`: the argument to unescape.