{"action":"created","issue":{"url":"https://api.github.com/repos/kimmobrunfeldt/nap/issues/12","repository_url":"https://api.github.com/repos/kimmobrunfeldt/nap","labels_url":"https://api.github.com/repos/kimmobrunfeldt/nap/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/kimmobrunfeldt/nap/issues/12/comments","events_url":"https://api.github.com/repos/kimmobrunfeldt/nap/issues/12/events","html_url":"https://github.com/kimmobrunfeldt/nap/issues/12","id":117123093,"number":12,"title":"Don't swallow last URL component if it doesn't end in a slash","user":{"login":"ilkka","id":1549,"avatar_url":"https://avatars.githubusercontent.com/u/1549?v=3","gravatar_id":"","url":"https://api.github.com/users/ilkka","html_url":"https://github.com/ilkka","followers_url":"https://api.github.com/users/ilkka/followers","following_url":"https://api.github.com/users/ilkka/following{/other_user}","gists_url":"https://api.github.com/users/ilkka/gists{/gist_id}","starred_url":"https://api.github.com/users/ilkka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ilkka/subscriptions","organizations_url":"https://api.github.com/users/ilkka/orgs","repos_url":"https://api.github.com/users/ilkka/repos","events_url":"https://api.github.com/users/ilkka/events{/privacy}","received_events_url":"https://api.github.com/users/ilkka/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2015-11-16T13:29:34Z","updated_at":"2016-11-11T18:53:12Z","closed_at":null,"body":"I did the equivalent of this:\n\n```\nfrom urlparse import urljoin\napi = Url(urljoin(MY_BASEURL, 'api'))\napi.get('foos/123')\n```\n\nand wondered why it gave me a 404 when `curl http://${MY_BASEURL}/api/foos/123` worked just fine in the console, but then it dawned on me that the code was actually dropping `api` and calling `http://${MY_BASEURL}/foos/123`. Adding a slash like this solved the problem:\n\n```\napi = Url(urljoin(MY_BASEURL, 'api/'))\n```\n\nbut I think that just doesn't look as good, and the default behavior is kind of surprising. I would find it better for client code if nap would add a slash to the base URL passed to `Url()` transparently.\n"},"comment":{"url":"https://api.github.com/repos/kimmobrunfeldt/nap/issues/comments/260028066","html_url":"https://github.com/kimmobrunfeldt/nap/issues/12#issuecomment-260028066","issue_url":"https://api.github.com/repos/kimmobrunfeldt/nap/issues/12","id":260028066,"user":{"login":"mairsbw","id":13241204,"avatar_url":"https://avatars.githubusercontent.com/u/13241204?v=3","gravatar_id":"","url":"https://api.github.com/users/mairsbw","html_url":"https://github.com/mairsbw","followers_url":"https://api.github.com/users/mairsbw/followers","following_url":"https://api.github.com/users/mairsbw/following{/other_user}","gists_url":"https://api.github.com/users/mairsbw/gists{/gist_id}","starred_url":"https://api.github.com/users/mairsbw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mairsbw/subscriptions","organizations_url":"https://api.github.com/users/mairsbw/orgs","repos_url":"https://api.github.com/users/mairsbw/repos","events_url":"https://api.github.com/users/mairsbw/events{/privacy}","received_events_url":"https://api.github.com/users/mairsbw/received_events","type":"User","site_admin":false},"created_at":"2016-11-11T18:53:12Z","updated_at":"2016-11-11T18:53:12Z","body":"Yes, I just ran into this problem. Is there a potential fix for this on the horizon? I just installed 2.0.0 from PyPI."}}
{"actor":{"display_login":"mairsbw"}}