postmanlabs / postman-app-support

Postman is an API platform for building and using APIs. Postman simplifies each step of the API lifecycle and streamlines collaboration so you can create better APIs—faster.
https://www.postman.com
5.86k stars 841 forks source link

Add body form data via pre-request scripts is not effective #9000

Closed alimlong closed 4 years ago

alimlong commented 4 years ago

Describe the bug Add body form data via pre-scriptis is not effective

To Reproduce Steps to reproduce the behavior:

  1. Create a new POST request.
  2. Add some x-www-form-urlencoded format data in body.
  3. Edit pre-request script, add a extra data to pm.request.body.
  4. Send request.
  5. Check request in pm console.

Expected behavior All body data will send by request.

Screenshots image image image

App information (please complete the following information):

Additional context Add any other context about the problem here.

codenirvana commented 4 years ago

@alimlong Request body can't be mutated via pre-request script at the moment, please follow #4808 for updates on this feature request.

Closing as duplicate of #4808