jakartaee / jakartaee/rest

Need way to generate similar resource URL's from given URL

Open
#29 5 comments 0 reactions 1 assignee View on GitHub

@glassfishrobot is already working on this.

Since Feb 10, 2018.

Dominant language
Java
Stars
400
Forks
143
PR merge metrics
No merged PRs in 30d

Description

I posted along these lines a while back, but I continue to run into cases where
I need to make modifications to a URI, and there doesn't seem to be an easy way
to do it.
For instance, if my resource has URI .../color/red/width/10/height/5, I find
myself needing to redirect the client after an "edit" operation to
.../color/BLUE/width/10/height/2.

What I really want is
UriInfo.getAbsolutePathBuilder().addOrReplaceSegment("color/$","BLUE").addOrReplaceSegment("height/$

{height}

","2");
#### Environment
Operating System: All
Platform: Macintosh
#### Affected Versions
[2.1]

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.