0
@POST
@Path("/id")
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
public Response getDetails(DetailsRequest detailsRequest) {[![enter image description here][1]][1]

ttps://i.stack.imgur.com/ywgtS.png

how to pull RedId from headers in POST call , need help on this

R M
  • 69
  • 1
  • 7

1 Answers1

2

Supposing that you are using JAX-RS, and that DetailsRequest inherit from HttpServletRequest, if you want to follow security good practices, you might use servlet filters, as in https://stackoverflow.com/a/45224180/20161294 . then use:

String headerValue = detailsRequest.getHeaders("RefId");

v-g
  • 338
  • 4