calcinai / xero-php

A php library for the Xero API, with a cleaner OAuth interface and ORM-like abstraction.
MIT License
357 stars 256 forks source link

Remove slash from base url #912

Closed mogilvie closed 1 month ago

mogilvie commented 1 month ago

The XeroPHP\Application\URL concatenates the Application config base_url with the path.

    /**
     * @return string
     */
    public function getFullURL()
    {
        $url = sprintf('%s/%s', $this->base_url, $this->path);

        return$url;
    }

resulting in a double slash after the base url. https://api.xero.com//api.xro/2.0/Journals?paymentsOnly=true&offset=33300.

Remove the trailing forward slash from the base_url.

calcinai commented 1 month ago

@mogilvie Does this cause an issue with anything in particular? I know it's not correct, just can't think when/how it was introduced!

mogilvie commented 1 month ago

No, just identified it while I was resolving a different issue.

calcinai commented 1 month ago

I'm going to leave this for a new version, as it's possible people are relying on that trailing slash.