Re: [RFC] Add http_(get|clear)_last_request_headers() function

From: Date: Tue, 30 Jan 2024 08:48:11 +0000
Subject: Re: [RFC] Add http_(get|clear)_last_request_headers() function
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-122262@lists.php.net to get a copy of this message
Hi Gina, I would like to propose an RFC to add the functions > http_get_last_request_headers() and http_clear_last_request_headers() to > PHP to replace the magic variable $http_response_header. > > Link: https://wiki.php.net/rfc/http-last-response-headers > Sorry I missed this RFC. In Symfony's HttpClient, we use stream_get_meta_data($h)['wrapper_data'] to access headers, so there is already a way to get them using nothing but local scope. This makes me wonder why, in "rejected ideas", you wrote this? > One suggested idea was to provide those headers via a by-reference entry > to the stream context. Maybe we don't need anything but to promote what works already (this "wrapper_data" entry)? Nicolas

« previous php.internals (#122262) next »