How to create a HttpRequest with x-www-form-urlencoded parameters

Hi team ,
can you please help me in creating HttpRequest().XHR().POST() request with x-www-form-urlencoded
please refer below screenshot form more details

Previous i have created request with form-data but not getting correct responce
but not working as expected

Thanks in Advance

I have tried

but did not worked as expected


The code from your first post should work okay. There is no need to set additional headers. They should be set automatically. You can verify the headers and also the form data of the outgoing request in the result browser for your scenario run.

According to your description it seems that the request was made successfully and the server replies, but with an unexpected response. What response did you expect and what was delivered instead? Did the server provide any additional details?

Thanks for the replay and the problem is in my script .