add file response for php, update test case

This commit is contained in:
wing328
2015-06-26 20:50:57 +08:00
parent fcd0b31d7d
commit 7f31da734d
10 changed files with 56 additions and 34 deletions

View File

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