[wp-trac] [WordPress Trac] #46160: No route was found matching the URL and request method

WordPress Trac noreply at wordpress.org
Fri Feb 1 00:26:53 UTC 2019


#46160: No route was found matching the URL and request method
-------------------------------+------------------------------
 Reporter:  RogueWebDesign     |       Owner:  (none)
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  REST API           |     Version:
 Severity:  normal             |  Resolution:
 Keywords:  reporter-feedback  |     Focuses:
-------------------------------+------------------------------
Changes (by TimothyBlynJacobs):

 * keywords:  needs-patch dev-feedback => reporter-feedback
 * severity:  critical => normal


Comment:

 This is working fine for me.

 I added the custom code to a sample plugin, and adjusted the callback to
 return data.

 {{{#!php
 <?php
 function our_custom_callback_function() {
         return array( 'test' );
 }
 }}}

 Making a POST request, and I get the expected result.

 {{{
 curl -X POST http://trunk.test/wp-json/custom-namespace/v1/endpointtest
 ["test"]
 }}}

 How are you testing?

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


More information about the wp-trac mailing list