[wp-trac] [WordPress Trac] #35426: Create response status code aliases on WP_Http for convenience

WordPress Trac noreply at wordpress.org
Tue Jan 12 20:08:22 UTC 2016


#35426: Create response status code aliases on WP_Http for convenience
--------------------------+-------------------
 Reporter:  joehoyle      |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  4.5
Component:  HTTP API      |    Version:  trunk
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-------------------
 Throughout the REST API for response codes, we want to use aliased
 constants to be more clear in the code for each response code.

 The best place to put these constants I think is `WP_Http`. This means in
 the REST API (and any other code) rather than specifying response codes
 directly (which is terse and opaque) one can use `WP_Http::BAD_REQUEST`
 for example.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/35426>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list