bugfix
This commit is contained in:
@@ -39,11 +39,13 @@ class HttpUtils {
|
|||||||
if ($parameters[$key] === null) {
|
if ($parameters[$key] === null) {
|
||||||
unset($parameters[$key]);
|
unset($parameters[$key]);
|
||||||
} else {
|
} else {
|
||||||
|
if ($key != HttpUtils::JSON_PARAM_BODY) {
|
||||||
$parameters[$key] = (string)$parameters[$key];
|
$parameters[$key] = (string)$parameters[$key];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static function buildDataForContentType($contentType, $parameters, &$headers) {
|
public static function buildDataForContentType($contentType, $parameters, &$headers) {
|
||||||
$data = null;
|
$data = null;
|
||||||
@@ -56,7 +58,7 @@ class HttpUtils {
|
|||||||
break;
|
break;
|
||||||
case ContentType::JSON:
|
case ContentType::JSON:
|
||||||
$headers[] = "Content-Type: application/json";
|
$headers[] = "Content-Type: application/json";
|
||||||
$data = json_encode($parameters[JSON_PARAM_BODY]);
|
$data = json_encode($parameters[HttpUtils::JSON_PARAM_BODY]);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw new MashapeClientException(
|
throw new MashapeClientException(
|
||||||
|
|||||||
Reference in New Issue
Block a user