Browse Source

Merge pull request #152 from hans-erickson/master

Add encode_url() call to Client class when adding parameter values. (issue #151)
yhirose 6 years ago
parent
commit
75989653a9
1 changed files with 1 additions and 1 deletions
  1. 1 1
      httplib.h

+ 1 - 1
httplib.h

@@ -2125,7 +2125,7 @@ Client::Post(const char *path, const Headers &headers, const Params &params) {
     if (it != params.begin()) { query += "&"; }
     query += it->first;
     query += "=";
-    query += it->second;
+    query += detail::encode_url(it->second);
   }
 
   return Post(path, headers, query, "application/x-www-form-urlencoded");