# HG changeset patch # User Dan Fuhry # Date 1293770596 18000 # Node ID 19b49910e81fd31421c0e857046cd534c09d272f # Parent 12286b3ee21417e10634756ff8e30eeb97ea74a9 Added set_post() in Request_HTTP diff -r 12286b3ee214 -r 19b49910e81f includes/http.php --- a/includes/http.php Wed Dec 29 13:25:32 2010 -0500 +++ b/includes/http.php Thu Dec 30 23:43:16 2010 -0500 @@ -139,6 +139,13 @@ var $parms_post = array(); /** + * A string that can wholly replace the parameters in POST. If false, parameters are used as usual. + * @var mixed + */ + + var $post_string = false; + + /** * The list of cookies that will be sent. * @var array (associative) */ @@ -344,6 +351,16 @@ } /** + * Replace POST with a custom string, or false to use parameters through add_post(). + * @param string + */ + + function set_post($str) + { + $this->post_string = $str; + } + + /** * Internal function to open up the socket. * @access private */ @@ -920,7 +937,11 @@ $get .= "$name"; } } - if ( count($this->parms_post) > 0 ) + if ( is_string($this->post_string) ) + { + $post = $this->post_string; + } + else if ( count($this->parms_post) > 0 ) { $post = ''; $i = 0;