fixed content-type check for model

This commit is contained in:
William Cheng 2015-04-08 11:54:57 +08:00
parent cb2f5d3e25
commit eb0fccd1d2

View File

@ -94,7 +94,7 @@ class APIClient {
$headers[] = $this->headerName . ": " . $this->headerValue; $headers[] = $this->headerName . ": " . $this->headerValue;
} }
if ((isset($headers['Content-Type']) and strpos($headers['Content-Type'], "multipart/form-data")) < 0 and (is_object($postData) or is_array($postData))) { if ((isset($headers['Content-Type']) and strpos($headers['Content-Type'], "multipart/form-data") < 0) and (is_object($postData) or is_array($postData))) {
$postData = json_encode($this->sanitizeForSerialization($postData)); $postData = json_encode($this->sanitizeForSerialization($postData));
} }