|
@@ 144-148 (lines=5) @@
|
| 141 |
|
$header = array("Accept:application/$this->BodyType", "Content-Type:application/$this->BodyType;charset=utf-8", "Authorization:$authen"); |
| 142 |
|
// 发送请求 |
| 143 |
|
$result = $this->curl_post($url, $body, $header); |
| 144 |
|
if ($this->BodyType === 'json') {//JSON格式 |
| 145 |
|
$datas = json_decode($result); |
| 146 |
|
} else { //xml格式 |
| 147 |
|
$datas = simplexml_load_string(trim($result, " \t\n\r")); |
| 148 |
|
} |
| 149 |
|
//重新装填数据 |
| 150 |
|
if ($datas->statusCode === 0) { |
| 151 |
|
if ($this->BodyType === 'json') { |
|
@@ 210-214 (lines=5) @@
|
| 207 |
|
$header = array("Accept:application/$this->BodyType", "Content-Type:application/$this->BodyType;charset=utf-8", "Authorization:$authen"); |
| 208 |
|
// 发送请求 |
| 209 |
|
$result = $this->curl_post($url, $body, $header); |
| 210 |
|
if ($this->BodyType === 'json') {//JSON格式 |
| 211 |
|
$datas = json_decode($result); |
| 212 |
|
} else { //xml格式 |
| 213 |
|
$datas = simplexml_load_string(trim($result, " \t\n\r")); |
| 214 |
|
} |
| 215 |
|
|
| 216 |
|
return $datas; |
| 217 |
|
} |