X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=docs%2F3_Developer_Guides%2F6_AFB_Helper_Guide%2F3.7.4_URL_Escaping.md;fp=docs%2F3_Developer_Guides%2F6_AFB_Helper_Guide%2F3.7.4_URL_Escaping.md;h=c6f411c86f04b5afc3593ca8ea4ab4b6c6097d53;hb=4aad369c9728061c97b3de792286e743ee884b09;hp=0000000000000000000000000000000000000000;hpb=619a7e48085be1538c3b01eb93dcb9dc95bf0436;p=AGL%2Fdocumentation.git diff --git a/docs/3_Developer_Guides/6_AFB_Helper_Guide/3.7.4_URL_Escaping.md b/docs/3_Developer_Guides/6_AFB_Helper_Guide/3.7.4_URL_Escaping.md new file mode 100644 index 0000000..c6f411c --- /dev/null +++ b/docs/3_Developer_Guides/6_AFB_Helper_Guide/3.7.4_URL_Escaping.md @@ -0,0 +1,46 @@ +--- +edit_link: '' +title: URL escaping +origin_url: >- + https://git.automotivelinux.org/src/libafb-helpers/plain/docs/escape.md?h=master +--- + + + +# Escaping helpers functions reference + +## char *escape_url(const char *base, const char *path, const char * const *args, size_t *length) + +Escape an `url` and `arguments` and returned it as a string. + +* `base`: representing the FQDN of the url. +* `path`: the path to the requested page. +* `args`: optionnal array of arguments provided for the GET request. +* `length`: length of the returned `url`. + +Returns the escaped `url`. + +## const char *escape_args(const char * const *args, size_t *length) + +Escape an array of arguments and returned the lenght of the escaped arguments +string. + +* `args`: array of arguments provided for the GET request. +* `length`: length of the returned `arguments`. + +Returns the escaped `arguments`. + +## const char *escape_str(const char *str, size_t *length) + +Escape a string and returns it. + +* `str`: the string to escape. +* `length`: length of the returned string. + +Returns the escaped string. + +## const char **unescape_args(const char *args) + +Unescape an argument and returns it. + +* `args`: the argument to unescape.