From 8f3d3956b1e837c726859eb8bbe19dad79c54a42 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Sat, 29 Apr 2017 23:55:46 +0300 Subject: Add hxx extension for headers and lib prefix for library dirs --- web/mime-url-encoding.hxx | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 web/mime-url-encoding.hxx (limited to 'web/mime-url-encoding.hxx') diff --git a/web/mime-url-encoding.hxx b/web/mime-url-encoding.hxx new file mode 100644 index 0000000..d45f4ca --- /dev/null +++ b/web/mime-url-encoding.hxx @@ -0,0 +1,30 @@ +// file : web/mime-url-encoding.hxx -*- C++ -*- +// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +#ifndef WEB_MIME_URL_ENCODING_HXX +#define WEB_MIME_URL_ENCODING_HXX + +#include +#include + +namespace web +{ + // @@ Add the query flag (true by default). If true, then the encoding is + // applied to the URL query part, and so the plus character is used to + // encode the space character. Audit use cases afterwards. + // + void + mime_url_encode (const char* v, std::ostream& o); + + std::string + mime_url_encode (const char* v); + + std::string + mime_url_encode (const std::string& v); + + std::string + mime_url_decode (const char* b, const char* e, bool trim = false); +} + +#endif // WEB_MIME_URL_ENCODING_HXX -- cgit v1.1