| 1001 | string output; |
| 1002 | |
| 1003 | foreachpair (const string& key, const string& value, query) { |
| 1004 | output += http::encode(key); |
| 1005 | if (!value.empty()) { |
| 1006 | output += "=" + http::encode(value); |
| 1007 | } |
| 1008 | output += '&'; |
| 1009 | } |
| 1010 | return strings::remove(output, "&", strings::SUFFIX); |
| 1011 | } |
| 1012 |