This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

adding optional content_type parameter to post and put methods, enabl…

…ing the web tester to push specific encodings with the request
  • Loading branch information...
maetl_
maetl_ committed Oct 14, 2009
1 parent 30d07ce commit 37f039bd8d31bceaad3b5b1127f33d82fdd9ba4a
Showing with 6 additions and 4 deletions.
  1. +6 −4 web_tester.php
View
@@ -707,11 +707,12 @@ function get($url, $parameters = false) {
* the base URL reflects the new location.
* @param string $url URL to fetch.
* @param mixed $parameters Optional POST parameters or content body to send
+ * @param string $content_type Content type of provided body
* @return boolean/string Raw page on success.
* @access public
*/
- function post($url, $parameters = false) {
- return $this->failOnError($this->browser->post($url, $parameters));
+ function post($url, $parameters = false, $content_type = false) {
+ return $this->failOnError($this->browser->post($url, $parameters, $content_type));
}
/**
@@ -721,11 +722,12 @@ function post($url, $parameters = false) {
* the base URL reflects the new location.
* @param string $url URL to fetch.
* @param mixed $body Optional content body to send
+ * @param string $content_type Content type of provided body
* @return boolean/string Raw page on success.
* @access public
*/
- function put($url, $body = false) {
- return $this->failOnError($this->browser->put($url, $body));
+ function put($url, $body = false, $content_type = false) {
+ return $this->failOnError($this->browser->put($url, $body, $content_type));
}
/**

0 comments on commit 37f039b

Please sign in to comment.