Make WordPress Core


Ignore:
Timestamp:
02/03/2023 01:33:18 PM (16 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-block-renderer-controller.php

    r54402 r55210  
    502502        $request          = new WP_REST_Request( 'POST', self::$rest_api_route . self::$block_name );
    503503        $request->set_param( 'context', 'edit' );
    504         $request->set_header( 'content-type', 'application/json' );
     504        $request->set_header( 'Content-Type', 'application/json' );
    505505        $request->set_body( wp_json_encode( compact( 'attributes' ) ) );
    506506        $response = rest_get_server()->dispatch( $request );
Note: See TracChangeset for help on using the changeset viewer.