Skip to content

Commit

Permalink
removed direct HTTP requesting functions: get, head, post, put, delete
Browse files Browse the repository at this point in the history
  • Loading branch information
hiqsol committed Jan 20, 2017
1 parent d45d933 commit 632fe97
Showing 1 changed file with 0 additions and 74 deletions.
74 changes: 0 additions & 74 deletions src/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -195,80 +195,6 @@ public function createQueryBuilder()
}


/**
* Performs GET HTTP request.
* @param string $url URL
* @param array $query query options (GET parameters)
* @param bool $raw Do not try to decode data, event when response is decodeable (JSON). Defaults to `false`
* @throws HiArtException
* @throws \yii\base\InvalidConfigException
* @return mixed response
*/
public function get($url, $query = [], $raw = false)
{
return $this->makeRequest('GET', $url, $query, null, $raw);
}

/**
* Performs HEAD HTTP request.
* @param string $url URL
* @param array $query query options
* @param bool $raw Do not try to decode data, event when response is decodeable (JSON). Defaults to `false`
* @throws HiArtException
* @throws \yii\base\InvalidConfigException
* @return mixed response
*/
public function head($url, $query = [], $body = null)
{
return $this->makeRequest('HEAD', $url, $query, $body);
}

/**
* Performs POST HTTP request.
* @param string $url URL
* @param array $query query options (GET parameters)
* @param string $body request body (POST parameters)
* @param bool $raw Do not try to decode data, event when response is decodeable (JSON). Defaults to `false`
* @throws HiArtException
* @throws \yii\base\InvalidConfigException
* @return mixed response
*/
public function post($url, $query = [], $body = null, $raw = false)
{
return $this->makeRequest('POST', $url, $query, $body, $raw);
}

/**
* Performs PUT HTTP request.
* @param string $url URL
* @param array $query query options (GET parameters)
* @param string $body request body (POST parameters)
* @param bool $raw Do not try to decode data, event when response is decodeable (JSON). Defaults to `false`
* @throws HiArtException
* @throws \yii\base\InvalidConfigException
* @return mixed response
*/
public function put($url, $query = [], $body = null, $raw = false)
{
return $this->makeRequest('PUT', $url, $query, $body, $raw);
}

/**
* Performs DELETE HTTP request.
* @param string $url URL
* @param array $query query options (GET parameters)
* @param string $body request body (POST parameters)
* @param bool $raw Do not try to decode data, event when response is decodeable (JSON). Defaults to `false`
* @throws HiArtException
* @throws \yii\base\InvalidConfigException
* @return mixed response
*/
public function delete($url, $query = [], $body = null, $raw = false)
{
return $this->makeRequest('DELETE', $url, $query, $body, $raw);
}


/**
* Make request and check for error.
* @param string $url URL
Expand Down

0 comments on commit 632fe97

Please sign in to comment.