|
|
|
|
@ -29,7 +29,9 @@ class Response |
|
|
|
|
if(!empty($self->source)) { |
|
|
|
|
$contentType = $response->getHeader('Content-Type'); |
|
|
|
|
if(empty($contentType)) { |
|
|
|
|
throw new ApiException('反馈的消息未指明内容格式Content-Type'); |
|
|
|
|
//throw new ApiException('反馈的消息未指明内容格式Content-Type'); |
|
|
|
|
//如果没有默认为这个 |
|
|
|
|
$contentType[0] = 'application/json; charset=utf-8'; |
|
|
|
|
} |
|
|
|
|
$bodyFormat = explode(';', $contentType[0]); |
|
|
|
|
switch ($bodyFormat[0]) { |
|
|
|
|
|