add binary support for php response

This commit is contained in:
wing328
2016-01-14 17:27:21 +08:00
parent 078f68a211
commit f54185c66d
9 changed files with 236 additions and 7 deletions

View File

@@ -230,7 +230,7 @@ class ApiClient
throw new ApiException("API call to $url timed out: ".serialize($response_info), 0, null, null);
} elseif ($response_info['http_code'] >= 200 && $response_info['http_code'] <= 299 ) {
// return raw body if response is a file
if ($responseType == '\SplFileObject') {
if ($responseType == '\SplFileObject' || $responseType == 'ByteArray') {
return array($http_body, $response_info['http_code'], $http_header);
}