Fix nzbget api url not working if missing trailing slash
This commit is contained in:
parent
1297ae7bb3
commit
dbe5f1dfb2
1 changed files with 3 additions and 1 deletions
|
@ -68,8 +68,10 @@ class Nzbget implements Contracts\Applications, Contracts\Livestats {
|
|||
|
||||
$rebuild_url = str_replace('http://', 'http://'.$username.':'.$password.'@', $url);
|
||||
$rebuild_url = str_replace('https://', 'https://'.$username.':'.$password.'@', $rebuild_url);
|
||||
$rebuild_url = rtrim($rebuild_url, '/');
|
||||
|
||||
$api_url = $rebuild_url.'jsonrpc/'.$endpoint;
|
||||
|
||||
$api_url = $rebuild_url.'/jsonrpc/'.$endpoint;
|
||||
|
||||
$client = new Client(['http_errors' => false]);
|
||||
$res = $client->request('GET', $api_url);
|
||||
|
|
Loading…
Reference in a new issue