aboutsummaryrefslogtreecommitdiffstats
path: root/docs/3_Developer_Guides/4_AFB_Helper_Guide/4_URL_Escaping.md
diff options
context:
space:
mode:
authorShankho Boron Ghosh <shankhoghosh123@gmail.com>2020-11-30 03:44:47 +0530
committerShankho Boron Ghosh <shankhoghosh123@gmail.com>2020-11-29 23:20:37 +0000
commit5727bbb99921a741ee7203a070f580a026f37bc8 (patch)
treed92b1d1d61fb3e9e3ca7b7fac7e521ad2c35e40a /docs/3_Developer_Guides/4_AFB_Helper_Guide/4_URL_Escaping.md
parente5e292979e4a08e036e6545d55dd8515a8b6c280 (diff)
Added AFB Helper Guide in Developer Guides
Revised and added AFB Helper Guide as a part of Developer Guides. Bug-AGL: [SPEC-3633] Signed-off-by: Shankho Boron Ghosh <shankhoghosh123@gmail.com> Change-Id: I3df9265ae0570e987d80bc4bd2d3d14e7743b26a
Diffstat (limited to 'docs/3_Developer_Guides/4_AFB_Helper_Guide/4_URL_Escaping.md')
-rw-r--r--docs/3_Developer_Guides/4_AFB_Helper_Guide/4_URL_Escaping.md39
1 files changed, 39 insertions, 0 deletions
diff --git a/docs/3_Developer_Guides/4_AFB_Helper_Guide/4_URL_Escaping.md b/docs/3_Developer_Guides/4_AFB_Helper_Guide/4_URL_Escaping.md
new file mode 100644
index 0000000..4070acb
--- /dev/null
+++ b/docs/3_Developer_Guides/4_AFB_Helper_Guide/4_URL_Escaping.md
@@ -0,0 +1,39 @@
+---
+title: Escaping helpers functions
+---
+
+## 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.