1

I'm using a Jmeter 5.3, and a need send PUT request with PathVariable AND RequestParam in the same endpoint.

Example:

@RequestMapping(value = "/authorize/{iduser}", method = RequestMethod.PUT)
    public ResponseEntity<Void> authorizeUser(
            @PathVariable Integer iduser,
            @RequestParam(value = "idstore") Integer idstore,
            @RequestParam(value = "typerequest") Integer type)
            { ...

I use a HTTP REQUEST component

PUT -> <URL>/authorize/${iduser}

Parameters:

name      | Value
idstore   | 139
type      | 1

But a receive 400 BAD REQUEST.

{"timestamp":1595881241767,"status":400,"error":"Bad Request",
"message":"Required Integer parameter 'idstore' is not present","path":"/authorize/175"}

any suggestion ?

Ori Marko
  • 56,308
  • 23
  • 131
  • 233
Madson Silva
  • 53
  • 1
  • 4

1 Answers1

0

Put the parameters as part of the path:

PUT -> <URL>/authorize/${iduser}?idstore=139&typerequest=1

also maybe you need to send Content-type header with application/json

Ori Marko
  • 56,308
  • 23
  • 131
  • 233