Parasoft BUG - requestBody correlation for x-www-form-urlencoded POST requests

danielasofieidanielasofiei Posts: 4
edited June 18 in Virtualize

I came across a problem while trying to correlate or return the requestBody of a POST request x-www-form-urlencoded. Parasoft sees/returns an empty requestBody.
It would work for all request types (GET/PUT/DELETE) but not for POST, is this a bug?
Can confirm that it works for other requestBody types, raw/json/etc.

Comments

  • jakubiakjakubiak Posts: 684 admin

    Can you clarify what you mean by "correlate or return the requestBody of a POST x-www-form-urlencoded"? Are you using a REST Client in SOAtest? If so, what configuration are you trying to make to the REST Client? It's not clear to me exactly what you are trying to set up.

  • danielasofieidanielasofiei Posts: 4

    Apologies, first time posting here and it shouldn't be posted in SOATest I guess.

    I created a virtual asset in Parasoft Virtualize and I am trying to correlate the response based on a parameter in the request body.

    I am using Postman to test the virtual asset.

    The problem is that the Virtual Asset sees the request body empty when it receives a POST request x-www-form-urlencoded.

  • williammccuskerwilliammccusker Posts: 433 ✭✭

    Hi,

    Use a correlation on "URL Parameters" the request body of form-urlencoded is treated as parameters by tomcat and other containers so for Virtualize you correlate on them the same way you would for any normal query parameter.

    Hope this helps!

  • danielasofieidanielasofiei Posts: 4
    edited August 7

    Hi William,

    Thank you for your reply, I have tried to correlate on "URL Parameters" matching on the body parameters from request when sending the request type POST and request body x-www-form-urlencoded and the correlation still fails.

  • danielasofieidanielasofiei Posts: 4

    Apologies, tried again and it worked.
    Huge thanks!

  • williammccuskerwilliammccusker Posts: 433 ✭✭

    Glad to hear it worked!

Sign In or Register to comment.