php - GuzzleHTTP 响应 400 状态
问题描述
我一直在使用 GuzzleHttp,这是我的代码片段,这似乎以某种方式管理 GuzzleHTTP 中的会话。
$this->httpMethod=='GET';
if(!empty($this->httpMethod) && $this->httpMethod=='POST'){
$response = $this->client->post($finalUrl);
}else{
$response = $this->client->request($this->httpMethod, $finalUrl);
}
不幸的是,我收到了这个致命错误-
Fatal error: Uncaught GuzzleHttp\Exception\ClientException: Client error: `GET https://creator.zoho.com/api/json/test/view/All_SMS?zc_ownername=zc_owner&raw=1&authtoken=auth_token&scope=crmapi` resulted in a `400 Bad Request` response:
{"code":2945,"message":"DATATYPE_NOT_MATCHED"}
解决方案
推荐阅读
- c++ - 2组静态常量的c ++运行时调度
- python - 在不使用 matplotlib 的情况下绘制轨迹图
- java - 不为 Java 中的 SQL 查询解析整个表的方法 - JDBC
- django - Django LOGIN_REDIRECT_URL 和 ReactJS 路由器
- reactjs - React Hooks 反转 useState 的语法 - 很奇怪
- c# - 等待取消任务的简洁方法?
- vue.js - 运行 npm run serve 时如何自动保存已编译的 vue 文件
- java - 绘制方法执行多次
- c - 如何通过C语言中的Dijkstra算法在无向图中查找和保存并行最短路径
- php - PHP - 将数组拆分为多个键匹配的数组