[wp-trac] [WordPress Trac] #54015: Unable to pass _embed param to enveloped REST API requests

WordPress Trac noreply at wordpress.org
Mon Mar 28 15:22:10 UTC 2022


#54015: Unable to pass _embed param to enveloped REST API requests
----------------------------------------+-----------------------------
 Reporter:  spacedmonkey                |       Owner:  spacedmonkey
     Type:  defect (bug)                |      Status:  assigned
 Priority:  normal                      |   Milestone:  Future Release
Component:  REST API                    |     Version:  5.4
 Severity:  normal                      |  Resolution:
 Keywords:  has-patch needs-unit-tests  |     Focuses:  rest-api
----------------------------------------+-----------------------------

Comment (by TimothyBlynJacobs):

 Something along the lines of this:

 {{{#!php
 $this->expectOutputString( 'json body that we expect' );

 $_GET['embed'] = 'link';
 rest_get_server()->serve_request('/endpoint/to/test');
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/54015#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list