This commit is contained in:
thefosk
2012-11-15 19:09:22 -08:00
parent 3fb6ea187d
commit 435bae2f08

View File

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