Questions tagged [path-parameter]
105 questions
4
votes
1 answer
How to extract a path-param from a Reitit backend end route
How do you get a path-param out of a Reitit backend Clojure route? I am trying to get the val associated with :id in the following manner, but keep getting a 404 file not found error in the REPL.
["/foo/:id" {:get
(fn [{:keys [path-params ]}]
…

CambodianCoder
- 467
- 4
- 14
4
votes
2 answers
How to place parameters like /login/{param}/ for a post request in servlets
I have a login servlet and after successful login, I want the user to
/login/{username}/
How can I place username in the URL for POST request?
I have looked up certain answers like this and this but couldn't understand how to actually accomplish…

Shankha057
- 1,296
- 1
- 20
- 38
4
votes
0 answers
Purpose of URI parameters in the path component
We know that it is possible to pass parameters in the path component of URIs using the syntax ;param=value. I wonder what this is good for, taking into account that parameters can also be passed in the query component.
The Wikipedia article doesn't…

Gabor
- 61
- 2
4
votes
0 answers
RESTEasy cannot take in @PathParam typed Long
I have seen in tutorial (Jersey) that there is possibility to pass in JAX-RS @PathParam of type Long.
But when I have tried to do this with RESTEasy I'm getting error:
21:50:32,353 WARN [org.jboss.resteasy.core.ExceptionHandler] (default…

Michał Ziobro
- 10,759
- 11
- 88
- 143
4
votes
4 answers
JAX-RS, path params don't work
I try to pass a parameter via GET to a REST method.
@GET
@Path("{id}")
public Response getUser(@PathParam("id") String id) {
Query qry = em.createQuery("from User c WHERE id = :user_id");
qry.setParameter("user_id", id);
List…

Sesigl
- 600
- 4
- 17
4
votes
2 answers
Accept comma separated value in REST Webservice
I am trying to receive a list of String as comma separated value in the REST URI ( sample :
http://localhost:8080/com.vogella.jersey.first/rest/todo/test/1/abc,test
, where abc and test are the comma separated values passed in).
Currently I am…

coder
- 400
- 1
- 7
- 19
4
votes
1 answer
How to parse path-parameter with webapp2
I am coming from a Java REST background to Python on Google App Engine's. I need some help using webapp2 with path-parameters. Below is an example of how Java would read a request. Will someone please translate the code into how python would read it…

kasavbere
- 5,873
- 14
- 49
- 72
3
votes
0 answers
Binding requests path parameters to object
I'm trying to bind some path parameters to an object so i can make all the validaton based on annotations inside that class.
It works fine but the swagger documentation generated by springfox dont recongnize the @ApiParam annotations from the class…

Vitor Fontoura
- 31
- 1
3
votes
1 answer
How to allow slashes in path param in jax-rs endpoint
I have an endpoint as:
@Path("/products")
@Produces({ MediaType.APPLICATION_JSON })
public interface Products {
@PUT
@Path("/{productId}")
....
}
I have a jax-rs client implemented for this service and have it…

San Kay
- 91
- 2
- 8
3
votes
0 answers
Tomcat Jersey REST - Spaces in @PathParam
Should spaces be possible in @PathParams when creating REST-Services via Jersey 1.19 in Tomcat 2.0.27?
Jersey returns 400 Bad Request whenever I try to call my REST-Service with a space in the filename path param. It does not even reach my code. If…

annih
- 395
- 2
- 6
- 21
2
votes
1 answer
AWS Lambda event.pathParameters is undefined and hence cannot destructure a property
I am triggering my lambda function from an api. The lambda function returns a query from a dynamoDB table,
I am passing an ID to in api.
but it returns an error.
"Cannot destructure property 'Id' of 'event.pathParameters' as it is undefined".
'use…

user12755352
- 31
- 1
- 3
2
votes
0 answers
Why can't I redirect correctly my Java Servlet?
it is probably a dumb question, but I am really stuck and need your help. I have made a Java Servlet which is handling requests for a CRUD demo app. This is my servlet:
public class AuthorController extends HttpServlet {
private static final…

NewJavaEnthusiast
- 93
- 1
- 4
- 13
2
votes
1 answer
How do we pass parameters to a mounted route in nodeJS?
I'm taking a course on NodeJS, there were a few assignments related to routing, everything works fine except this part which seems a little odd: For some reason, I cannot read the parameter ID being passed to the mounted router.
dish.js
const…

Mike Gmez
- 111
- 3
- 18
2
votes
2 answers
Can we access URL's path parameters in a Tornado RequestHandler?
I know that in Tornado one can capture some parts of URL's using regular expressions, but isn't there a more structured way to access path parameters? Maybe something similar to the way you access query arguments…

SCGH
- 887
- 8
- 13
2
votes
2 answers
Java @PathParam always null
I'm trying to use the @PathParam using Jersey, but it always sees it as null.
Here's the method:
The url is http://localhost:8080/GiftRegistryAPI/api/v2/inventory/david with /v2/inventory being at the class level
package…

Omar.Ebrahim
- 862
- 1
- 10
- 30