[wp-trac] Re: [WordPress Trac] #4779: Proposal for HTTP POST and REQUEST API

WordPress Trac wp-trac at lists.automattic.com
Sun May 25 04:48:06 GMT 2008


#4779: Proposal for HTTP POST and REQUEST API
--------------------------------------------------+-------------------------
 Reporter:  darkdragon                            |        Owner:  anonymous
     Type:  enhancement                           |       Status:  new      
 Priority:  normal                                |    Milestone:  2.6      
Component:  Optimization                          |      Version:           
 Severity:  normal                                |   Resolution:           
 Keywords:  has-patch needs-testing dev-feedback  |  
--------------------------------------------------+-------------------------
Comment (by DD32):

 > attachment 4779.remote_http.diff added.

  * Includes PHPDoc
  * Fixed a number of warnings & bugs related to POST request
  * Status and Status Value are no longer returned in the headers list, but
 are properties themselves.

 Example return value:
 {{{
 $a = remote_http('http://api.wordpress.org/core/version-check/1.1/');

 var_dump($a);
 }}}
 {{{
 object(stdClass)[70]
   public 'status' => string '200' (length=3)
   public 'statusvalue' => string 'OK' (length=2)
   public 'headers' =>
     array
       'x-powered-by' => string 'PHP/5.2.5' (length=9)
       'content-type' => string 'text/plain; charset=utf-8' (length=25)
       'content-length' => string '44' (length=2)
       'date' => string 'Sun, 25 May 2008 04:46:16 GMT' (length=29)
       'server' => string 'LiteSpeed' (length=9)
       'connection' => string 'close' (length=5)
   public 'content' => string 'upgrade
 http://wordpress.org/download/&#' (length=44)
 }}}
 (note: content field is truncated via var_dump due to a bug in the XDebug
 extension in that example)

-- 
Ticket URL: <http://trac.wordpress.org/ticket/4779#comment:12>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list