#37168 closed defect (bug) (invalid)
wp_remote_post headers being set to lowercase
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.6 |
Component: | HTTP API | Keywords: | |
Focuses: | Cc: |
Description
Not sure if this is a known feature (it's not in the documentation anywhere that I could find), but if I set an all-caps header key in the args that I give to wp_remote_post, the header is converted to all lowercase.
So, for example:
<?php $response = wp_remote_post("https://my-api.com/endpoint", array( 'headers' => array( 'MY_API_KEY' => 'value', ), 'body' => array( 'foo' => 'bar', ), ));
results in...
my_api_key: 'value'
(along with the other default headers)
Any ideas?
Change History (2)
Note: See
TracTickets for help on using
tickets.
Disregard -- I think it's my server that's normalizing the headers.