In the Python version, I added [a small tweak to handle a trailing slash in the URLs](https://github.com/datopian/ckan-client-py/blob/master/ckanclient/__init__.py#L38-L39). That allows the client to work seamlessly having `https://my.ckan.server.org/` as well as `https:/my.ckan.server.org` as an input to create the client instance. This way we avoid building URLs such as `https://my.ckan.server.org/api/3/action//create_package`, which returns 404. I think all we need is to change the lines: https://github.com/datopian/ckan-client-js/blob/72fb56b46e6a0ae3490754b2b5890c96a3dbb938/lib/index.js#L21 To: ```javascript this.api = api if (!this.api.endsWith('/')) { this.api += '/' } ``` And remove the leading slash here: https://github.com/datopian/ckan-client-js/blob/72fb56b46e6a0ae3490754b2b5890c96a3dbb938/lib/index.js#L58 What do you think?