src/net/http/HttpRequest.php
public function setMethod($method) {
        if (!is_string($method))                 throw new IllegalTypeException('Illegal type of parameter $method: '.gettype($method));
        if ($method!=='GET' && $method!=='POST') throw new InvalidArgumentException('Invalid argument $method: '.$method);

        $this->method = $method;
        return $this;
    }
public function setMethod($method) {
        if (!is_string($method))                 throw new IllegalTypeException('Illegal type of parameter $method: '.gettype($method));
        if ($method!=='GET' && $method!=='POST') throw new InvalidArgumentException('Invalid argument $method: '.$method);

        $this->method = $method;
        return $this;
    }
public function setMethod ( $ method ) { if ( ! is_string ( $ method ) ) throw new IllegalTypeException ( 'Illegal type of parameter $method: ' . gettype ( $ method ) ) ; if ( $ method !== 'GET' && $ method !== 'POST' ) throw new InvalidArgumentException ( 'Invalid argument $method: ' . $ method ) ; $ this -> method = $ method ; return $ this ; }
Set the request's HTTP method. Currently only GET and POST are implemented.

@param  string $method

@return $this
Set the request s HTTP method . Currently only GET and POST are implemented .