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