Guzzle 6 Post upgrade

I recentely update my guzzle version from 3 to 6. The following call was working on 3 but now I need to upgrade it to 6 (as it is not working). After reading the docs, I am a little confused how this new post request works in Guzzle 6. Here is my OLD post request with Guzzle 3

            $request = $this->guzzleClient->post(
            $request->setHeader('Content-Type', 'application/json');
            $response = $request->send();

            return $response->json();

How do I transalate that so that it post the request?

Source: Symfony Questions

Was this helpful?

0 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *