Open JordanDalton opened 5 years ago
I have the same issue. I haven't found a solution yet. I get lowercase headers only on remote dev server. Instead on my local server all headers have capitalize case. It's very strange because these headers come from API. Help
I know it's wrong solution but I just change vendor/postmen/sdk-php/src/Postmen/Postmen.php file in 131 line.
$response_headers_array[strtolower($key)] = $value;
And changed all headers to lowercase in call() function. Now it's working.
+1 for this - I've worked around this by modifying Postmen.php to change that line to:
$headers_date = null;
if (isset($response_headers_array['Date'])) {
$headers_date = $response_headers_array['Date'];
}
For what it's worth: the issue seems to be in a way some libcurl/ext-curl versions/compilations normalise the response http headers. In some versions the headers are lowercased, and in other versions the headers are title-cased.
2 potential immediate solutions:
During testing today I ran into "Undefined index: Date"
Here's the stack trace:
In research I found the keys coming from the response headers are lowercase.
I'm unsure if it's a problem with your API or of it's something else.