收藏
回答

PHP语言,使用Guzzle HTTP 客户端为什么一直报 require POST method?

$token = $this->miniApp->create()->access_token->getToken(true);
$client = $this->clientFactory->create();
$res = $client->post('http://api.weixin.qq.com/wxa/servicemarket?access_token=' . $token['access_token'], [
    RequestOptions::JSON => [
        'service' => 'wxee446d7507c68b11',
        'api' => 'imgSecCheck',
        'client_msg_id' => 'client_msg_id_1',
        'data' => [
            'Action' => 'ImageModeration',
            'Scenes' => ["PORN", "POLITICS", "TERRORISM"],
            "ImageUrl" => $url,
            'ImageBase64' => '',
            'Config' => '',
            'Extra' => ''
        ]
    ]
]);

返回 : {"errcode":43002,"errmsg":"require POST method"}
最后一次编辑于  2020-12-18
回答关注问题邀请回答
收藏
登录 后发表内容
问题标签