LMSouq
php-dev Open

How can I use Guzzle to send a POST request in JSON?

US
user3379466
1 month ago
3 views
Problem Description
Does anybody know the correct way to `post` JSON using `Guzzle`? $request = $this->client->post(self::URL_REGISTER,array( 'content-type' => 'application/json' ),array(json_encode($_POST))); I get an `internal server error` response from the server. It works using Chrome `Postman`.

AI-Generated Solution

Powered by LMSouq AI · GPT-4.1-mini

✓ Solution Ready
Analyzing problem and generating solution…
Was this solution helpful?
Back to Knowledge Base