正在显示
1 个修改的文件
包含
5 行增加
和
1 行删除
| @@ -134,9 +134,13 @@ class Api | @@ -134,9 +134,13 @@ class Api | ||
| 134 | $header = []; | 134 | $header = []; |
| 135 | $body = ''; | 135 | $body = ''; |
| 136 | $fullPath = $path; | 136 | $fullPath = $path; |
| 137 | - if ($method == 'GET' && count($param) > 0) { | 137 | + if ($method == 'GET') { |
| 138 | + if (count($param) > 0) { | ||
| 138 | $fullPath = $path . '?' . http_build_query($param); | 139 | $fullPath = $path . '?' . http_build_query($param); |
| 139 | } else { | 140 | } else { |
| 141 | + $fullPath = $path; | ||
| 142 | + } | ||
| 143 | + } else { | ||
| 140 | $header[] = 'Content-Type: application/json'; | 144 | $header[] = 'Content-Type: application/json'; |
| 141 | $body = json_encode($param); | 145 | $body = json_encode($param); |
| 142 | } | 146 | } |
-
请 注册 或 登录 后发表评论