Skip to content

Commit

Permalink
Update HttpClient.php
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewStoyan authored and MykolaiKorniat committed Oct 19, 2018
1 parent cf95cf3 commit e3231ba
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/Gitlab/HttpClient/HttpClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,13 @@ public function put($path, array $parameters = array(), array $headers = array()
*/
public function request($path, array $parameters = array(), $httpMethod = 'GET', array $headers = array(), array $files = array())
{
$path = trim($this->baseUrl.$path, '/');
$uri = @parse_url($path);

if(!array_key_exists('scheme', $uri)) {
$path = $this->baseUrl . $path;
}

$path = trim($path, '/');

$request = $this->createRequest($httpMethod, $path, $parameters, $headers, $files);

Expand Down

0 comments on commit e3231ba

Please sign in to comment.