Send a file via pm.sendRequest

Hi is it possible to upload a local file using POST request with ‘Content-Type’: ‘multipart/form-data’

for example:

pm.sendRequest({
    url: https://url.com',
    method: 'POST',
    header: {
        'Authorization': 'Bearer token',
        'Content-Type': 'multipart/form-data'
    },
    body: {
        mode: "formdata",
        formdata:[
            {key: "file", 
            type: "file",
            src: "file.jpeg"}
            ]
    }

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.