Skip to content
Snippets Groups Projects
Commit 5537fd88 authored by Michael Hamann's avatar Michael Hamann
Browse files

HTTPClient: Implement handling of two-dimensional data arrays

parent 38c7b2bf
No related branches found
No related tags found
No related merge requests found
......@@ -808,8 +808,15 @@ class HTTPClient {
function _postEncode($data){
$url = '';
foreach($data as $key => $val){
if($url) $url .= '&';
$url .= urlencode($key).'='.urlencode($val);
if (is_array($val)) {
foreach ($val as $k => $v) {
if($url) $url .= '&';
$url .= urlencode($key).'['.$k.']='.urlencode($v);
}
} else {
if($url) $url .= '&';
$url .= urlencode($key).'='.urlencode($val);
}
}
return $url;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment