json body support

This commit is contained in:
thefosk
2012-11-15 16:50:13 -08:00
parent 0191cc569d
commit 66633cf78b
2 changed files with 4 additions and 2 deletions

View File

@@ -26,6 +26,8 @@
class HttpUtils { class HttpUtils {
const JSON_PARAM_BODY = "88416847677069008618";
public static function cleanParameters(&$parameters) { public static function cleanParameters(&$parameters) {
if ($parameters == null) { if ($parameters == null) {
$parameters = array(); $parameters = array();
@@ -54,7 +56,7 @@ class HttpUtils {
break; break;
case ContentType::JSON: case ContentType::JSON:
$headers[] = "Content-Type: application/json"; $headers[] = "Content-Type: application/json";
$data = $parameters; $data = $parameters[JSON_PARAM_BODY];
break; break;
default: default:
throw new MashapeClientException( throw new MashapeClientException(