Skip to content

Question: Do we have anything to get curl response body from curl_getinfo() #17053

@HeenaBansal20

Description

@HeenaBansal20

Description

Question:
I can extract curl response headers this way in my application:

$response =  curl_exec($ch);
 $getinfo = curl_getinfo($ch , CURLINFO_HEADER_SIZE);
  $response header = substr($curl_response, 0, $getinfo);

However , I am looking if there a way to get the whole response body from curl_getinfo() function in case I don't want to use curl_exec.
OR
is there a way to extract curl_response_headers without using $response body returned by curl_exec()

PHP Version

PHP 8.2

Operating System

Ubuntu 22

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions