In Postman, how to POST binary file use collection runner

随声附和 提交于 2021-02-09 03:17:49

问题


I am using the Postman Collection Runner to automate a series of API calls. On one of these API calls I need to submit a binary file as the body of a POST. When setting up the Collection Runner I see how to select a file, but I can't figure out how to attach that file to the body of the POST request in the "Pre-request Script".

Is it possible in a "Pre-request Script" to load a binary file into the "data" object?


回答1:


Currently postman collection runner doesn't support file uploads. You will have to use newman to execute your Automation Test Suite(collection).

Have a look at this answer: Postman - POST request with file upload



来源:https://stackoverflow.com/questions/45799280/in-postman-how-to-post-binary-file-use-collection-runner

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!