lithium\net\http\Service::patch PHP Method

patch() public method

Send PATCH request.
public patch ( string $path = null, array $data = [], array $options = [] ) : string
$path string
$data array
$options array
return string
    public function patch($path = null, $data = array(), array $options = array())
    {
        return $this->send(__FUNCTION__, $path, $data, $options);
    }

Usage Example

Example #1
0
 public function testMagicMethod()
 {
     $http = new Service($this->_testConfig);
     $response = $http->patch('some-path/stuff');
     $expected = "http://localhost:80/some-path/stuff";
     $result = $http->last->request->to('url');
     $this->assertEqual($expected, $result);
     $response = $http->patch('some-path/stuff', array('someData' => 'someValue'), array('return' => 'response'));
     $result = $http->last->request;
     $this->assertEqual('PATCH', $result->method);
     $this->assertEqual('lithium\\net\\http\\Response', get_class($response));
 }
All Usage Examples Of lithium\net\http\Service::patch