因此,我正在混乱的漫威API,我已经得到了这个错误,我找不到任何跟踪它的任何地方。
`409 Conflict` response: {"code":"MissingParameter","message":"You must provide a user key."} 我查看了API文档,找不到任何关于用户密钥的信息。
这是我的代码,我用的是Laravel和口香糖。
$res = $client->request('GET', 'http://gateway.marvel.com:80/v1/public/comics', [
'apikey' => $apikey,
'ts' => $now,
'hash' => md5($now . $privateKey . $apikey),
]);任何帮助都将不胜感激。
发布于 2018-08-12 00:11:07
尝试使用查询
$query = http_build_query([
'apikey' => $apikey,
'ts' => $now,
'hash' => md5($now . $privateKey . $apikey)
]);
$url = 'http://gateway.marvel.com:80/v1/public/comics?' . $query;
$res = $client->request('GET', $url);更新
看起来,您只需要在请求中设置查询选项。
$res = $client->request('GET', 'http://gateway.marvel.com:80/v1/public/comics', [
'query' => [
'apikey' => $apikey,
'ts' => $now,
'hash' => md5($now . $privateKey . $apikey)
]
]);发布于 2020-01-27 09:59:39
更改上传文件夹,问题就解决了。
https://stackoverflow.com/questions/51804643
复制相似问题