GuzzleHttp + POST + PHP +路径

时间:2018-12-19 16:35:27

标签: php post guzzlehttp

我需要一些帮助。我正在使用GuzzleHttp开发PHP中的帖子。 我的网址是->'http://qql/accountv2/schools/ {id} / users', 我需要在路径上传递一个ID,我的代码如下:

$URLAccV2Ssc = http://qql/accountv2/schools/{id}/users;
$idSchool = 123;        
        $responseSSC = $client->post($URLAccV2Ssc, [
            'form_params' => [
                "id" => $idSchool,
                "userId" => $user->getUUID(),
                "registry" => "string",
                "activeRegistry" => true

            ],
            'headers' => [
                'Authorization' => 'Bearer ' . $bearerTokenAccV2,
                'Content-type' => 'application/json'
            ]
        ]);

我的错误是-> [“”值'{id}'对于Guid无效。“,”解析值时遇到意外字符:i。路径

有人可以帮我吗? 谢谢。

0 个答案:

没有答案
相关问题