From e592121990e9a07186e4e8a68cc60866fc4cb6cf Mon Sep 17 00:00:00 2001 From: Andrew Date: Wed, 13 Aug 2014 17:09:55 -0700 Subject: [PATCH] Fixed trailing slash in URL Added regular expression to remove trailing slash if included in URL. Api::__construct --- src/Jira/Api.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Jira/Api.php b/src/Jira/Api.php index 2c642a5..cb8e8fb 100644 --- a/src/Jira/Api.php +++ b/src/Jira/Api.php @@ -72,6 +72,9 @@ public function __construct( AuthenticationInterface $authentication, ClientInterface $client = null ) { + //Regular expression to remove trailing slash + $endpoint = preg_replace('{/$}', '', $endpoint); + $this->setEndPoint($endpoint); $this->authentication = $authentication;