From 61c01cc4bb615337ee0591fea987eb6bee83a78e Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Wed, 4 Apr 2018 18:53:56 +0200 Subject: POST using unescaped arguments Add the ability to make a POST request without urlencode the arguments. This will only concatenate them instead. You can also specify the used separator. Change-Id: Icb61a5a20771a89e89159132365d86ee4c982d1c Signed-off-by: Romain Forlot --- escape.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'escape.c') diff --git a/escape.c b/escape.c index 3bb25c2..f370fc9 100644 --- a/escape.c +++ b/escape.c @@ -313,6 +313,12 @@ char *escape_args(const char * const *args, size_t *length) return escape_url(NULL, NULL, args, length); } +const char *escape_str(const char* str, size_t *length) +{ + const char *a[2] = { str, NULL }; + return escape_args(a, length); +} + const char **unescape_args(const char *args) { const char **r, **q; -- cgit 1.2.3-korg