Make WordPress Core


Ignore:
Timestamp:
02/03/2023 01:33:18 PM (21 months ago)
Author:
audrasjb
Message:

HTTP API: Fix request header inconsistencies.

This changeset improves the consistency in capitalization of fetching and outputting of request headers. It also updates occurrences found in some docblocks.

Props johnjamesjacoby, costdev, audrasjb, petitphp, mhkuu, SergeyBiryukov.
Fixes #54225.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/rest-api/rest-settings-controller.php

    r54131 r55210  
    774774        );
    775775        $request = new WP_REST_Request( 'PUT', '/wp/v2/settings' );
    776         $request->add_header( 'content-type', 'application/json' );
     776        $request->add_header( 'Content-Type', 'application/json' );
    777777        $request->set_body( wp_json_encode( $data ) );
    778778
Note: See TracChangeset for help on using the changeset viewer.