go-tigertonic icon indicating copy to clipboard operation
go-tigertonic copied to clipboard

Get Url pattern or Url with filled parameters from within handler

Open gorjan5sk opened this issue 11 years ago • 1 comments
trafficstars

I'm not sure whether I've just missed it in the docs/source code, but is there a way to extract the Original Url pattern or direct Url call to which a Handler responds for example when embedding resources or dealing with pagination so that it can be returned in the JSON?

For ex. The url for an /api/experimental/{experiment} called with /api/experimental/yoyo returned from a tigertonic.Marshalled Handler is: http://localhost:9980/experimental/yoyo?experiment=yoyo&%7Bexperiment%7D=yoyo&

Is there any way to unmarshal the url so we get a clean form /api/experimental/yoyo or better yet, get the pattern and do operations on it: /api/experimental/{experiment}

gorjan5sk avatar Aug 05 '14 16:08 gorjan5sk

No, I don't believe there's a way to get at that. If you find a way to make that available that's API-compatible I'd merge it.

rcrowley avatar Oct 05 '14 00:10 rcrowley