4070acb5033ce9131fa4fa439379ac23fd0a0002
[AGL/documentation.git] / docs / 3_Developer_Guides / 4_AFB_Helper_Guide / 4_URL_Escaping.md
1 ---
2 title: Escaping helpers functions
3 ---
4
5 ## char *escape_url(const char *base, const char *path, const char * const *args, size_t *length)
6
7 Escape an `url` and `arguments` and returned it as a string.
8
9 * `base`: representing the FQDN of the url.
10 * `path`: the path to the requested page.
11 * `args`: optionnal array of arguments provided for the GET request.
12 * `length`: length of the returned `url`.
13
14 Returns the escaped `url`.
15
16 ## const char *escape_args(const char * const *args, size_t *length)
17
18 Escape an array of arguments and returned the lenght of the escaped arguments
19 string.
20
21 * `args`: array of arguments provided for the GET request.
22 * `length`: length of the returned `arguments`.
23
24 Returns the escaped `arguments`.
25
26 ## const char *escape_str(const char *str, size_t *length)
27
28 Escape a string and returns it.
29
30 * `str`: the string to escape.
31 * `length`: length of the returned string.
32
33 Returns the escaped string.
34
35 ## const char **unescape_args(const char *args)
36
37 Unescape an argument and returns it.
38
39 * `args`: the argument to unescape.