Skip to content

Remove trailing slash in URL if it exists #25

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

Procta
Copy link
Contributor

@Procta Procta commented Aug 14, 2014

Added regular expression to remove trailing slash if included in URL. Api::__construct

Added regular expression to remove trailing slash if included in URL. Api::__construct
@@ -72,6 +72,9 @@ public function __construct(
AuthenticationInterface $authentication,
ClientInterface $client = null
) {
//Regular expression to remove trailing slash
$endpoint = preg_replace('{/$}', '', $endpoint);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be simplified like this and comment won't be needed anymore:

$endpoint = rtrim($endpoint, '/');

@jpastoor
Copy link
Collaborator

Expanded in #67.

@jpastoor jpastoor closed this Feb 28, 2016
@aik099
Copy link
Member

aik099 commented Feb 28, 2016

Thank you @Procta . To expedite the 2.0.0 release the @jpastoor would be making necessary changes based upon your commits and therefore this PR will be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants