0

I use this request:

  $client = new \GuzzleHttp\Client();
        $options = [
            'form_params' => [
                "tip" => "P",
                "voen" => "V",
                "voen" => $voen,
                "submit" => "Yoxla",
            ],
        ];
        $res = $client->request('POST', 'https://www.ebyn/payerOrVoenChecker.jsp', $options);

        dd($res->getBody());

As result I get this:

Stream {#340 ▼
  -stream: stream resource @424 ▼
    wrapper_type: "PHP"
    stream_type: "TEMP"
    mode: "w+b"
    unread_bytes: 0
    seekable: true
    uri: "php://temp"
    options: []
  }
  -size: null
  -seekable: true
  -readable: true
  -writable: true
  -uri: "php://temp"
  -customMetadata: []
}

So, how to get real body, it is HTML page?

POV
  • 11,293
  • 34
  • 107
  • 201
  • 1
    Possible duplicate of [Guzzlehttp - How get the body of a response from Guzzle 6?](https://stackoverflow.com/questions/30549226/guzzlehttp-how-get-the-body-of-a-response-from-guzzle-6) – krylov123 Sep 18 '19 at 18:45

1 Answers1

1

Your solution:

$res->getBody()->getContents();

Take a look at this answer for details.

krylov123
  • 739
  • 8
  • 15