{"action":"opened","issue":{"url":"https://api.github.com/repos/jmapio/jmap/issues/16","labels_url":"https://api.github.com/repos/jmapio/jmap/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/jmapio/jmap/issues/16/comments","events_url":"https://api.github.com/repos/jmapio/jmap/issues/16/events","html_url":"https://github.com/jmapio/jmap/issues/16","id":101527282,"number":16,"title":"Optional {name} parameter in download URL is unclear","user":{"login":"robn","id":130670,"avatar_url":"https://avatars.githubusercontent.com/u/130670?v=3","gravatar_id":"","url":"https://api.github.com/users/robn","html_url":"https://github.com/robn","followers_url":"https://api.github.com/users/robn/followers","following_url":"https://api.github.com/users/robn/following{/other_user}","gists_url":"https://api.github.com/users/robn/gists{/gist_id}","starred_url":"https://api.github.com/users/robn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robn/subscriptions","organizations_url":"https://api.github.com/users/robn/orgs","repos_url":"https://api.github.com/users/robn/repos","events_url":"https://api.github.com/users/robn/events{/privacy}","received_events_url":"https://api.github.com/users/robn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-17T22:58:57Z","updated_at":"2015-08-17T22:58:57Z","closed_at":null,"body":"From the spec:\r\n\r\n> The URL endpoint to use when downloading files, in RFC6570 URI Template (level 1) format. The URL MUST contain a variable called blobId. The URL SHOULD contain a variable called name. The client may use this template in combination with a blobId to download any binary data (files) referenced by other objects. Since a blob is not associated with a particular name, the template SHOULD allow a name to be substituted in as well; the server will return this as the filename if it sets a Content-Disposition header. \r\n\r\nBut, RFC6570 Level 1 has no provision for optional parameters. The proxy URL structure is `/raw/{userId}/{blobId}/{name}`. If I don't have a name, I can't usefully expand that template.\r\n\r\nI think Level 3 and '{?var}' is what's needed for this case:\r\n\r\n```\r\n/raw/{userId}/{blobId}{?name}\r\n```\r\n\r\nSo, now that I've written all that out! I don't think the spec itself needs to change other than to remove the \"Level 1\" requirement. Which does raise the bar a bit for clients, but there seems to be plenty of libraries available; one quick search finds [this list](https://code.google.com/p/uri-templates/wiki/Implementations)."}}