21 | Postman Tutorials | Pre-request | Writing pre-request scripts

preview_player
Показать описание
You can use pre-request scripts in #postman to execute JavaScript before a request runs. By including code in the Pre-request Script tab for a request, collection, or folder, you can carry out pre-processing such as setting variable values, parameters, headers, and body data. You can also use pre-request scripts for debugging code, for example by logging output to the console. #apitesting #api

🙏 do support me using the super thanks button in youtube continue to create more videos

Please 👍 Like, Subscribe 🔔 and Share the videos if you really like it, Thank You !
Рекомендации по теме
Комментарии
Автор

I am trying to extract comma separated values and pass it on as a Array to a property in PUT API request. However, while extracting these values (when extracted in pre-request coming as Object) not getting passed as string of array values ex: ["apple", "banana", "orange"] it is going as ["apple, banana, orange"]. Is there a way i can convert to required format using pre-request scripts ?

sree