URI templates #6

mislav opened this Issue Oct 21, 2009 · 5 comments


None yet
3 participants

mislav commented Oct 21, 2009


defunkt commented Oct 21, 2009

Merged in, thanks!


defunkt commented Oct 21, 2009

I'm re-opening this for now... the UI needs to be made more consistent with the rest of the app (e.g. the labels)


mislav commented Oct 21, 2009

Well, other text inputs don't have labels, so how do you want them to look? I thought abut using the "title" hack you're using for URL field but it doesn't seem a good fit and conflicts with default values.


leah commented Oct 21, 2009

Sorry, I was the one who rejected the change. I like the idea of URI templates but I want to reconsider the implementation.

I don't see any good use-case for dynamically making fields while typing in a URL... why not just put the values in the URL??

However, I do see another use-case:

API documentation for a website (such as Twitter) could use a link to Hurl with a URL parameter containing URI templates. Then Hurl could supply the input fields matching the URI template.


mislav commented Oct 21, 2009

Hey Leah, thanks for commenting.

Now, your idea of sites providing the URI template in the URL to hurl.it is good:


But I'm afraid it won't scale; the resulting hyperlink would be huge because URI templates are often very large and there's a possibility it might hit some limit of what a specific user agent could cram in a GET request. So my idea with this implementation was that the URI template itself is saved as a hurl—the resulting permalink is easy to share.

A drawback with my approach is exactly what you noticed: input fields appear dynamically, but someone who is entering this URI template doesn't have an intention of filling them in—he or she just wants to share the template with a nice permalink.

Proposed solution:

  1. no input fields appear dynamically,
  2. when the URL submitted to Hurl is a URI template, it is saved as a special Hurl and no external HTTP hits are performed at this point,
  3. the special Hurl is shared and when you open it you are presented with input fields that populate the template (like in my screenshot),
  4. once you fill in the fields and submit, the result gets processed and saved as a regular hurl (with response headers, body and such).


@mislav mislav closed this Sep 16, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment