相关疑难解决方法(0)

如何使用Guzzle以JSON格式发送POST请求?

有没有人知道post使用JSON 的正确方法Guzzle

$request = $this->client->post(self::URL_REGISTER,array(
                'content-type' => 'application/json'
        ),array(json_encode($_POST)));
Run Code Online (Sandbox Code Playgroud)

我收到internal server error服务器的回复.它适用于Chrome Postman.

php guzzle postman

160
推荐指数
9
解决办法
21万
查看次数

标签 统计

guzzle ×1

php ×1

postman ×1