Service Virtualization

 View Only

 How to send form data in a rest step (POST call)

Prashansa Prashansa's profile image
Prashansa Prashansa posted Jun 23, 2022 06:15 AM

Hi Team, 

I need to send a text file as an attachment to a post call, which is the only request data. Please let me know how can I send this via a REST step (POST call) in devtest. Also, kindly let me know if there are any other alternative steps for it. 

In postman we have a section called 'form-data', where I can upload the text file and hit the POST url and get back the response. Please let me know how can I achieve this using Devtest.


Shiney Abraham's profile image
Broadcom Employee Shiney Abraham
HTTP/HTML Step has the Form built in using POST Parameters.Form Encoding: application/x-www-form-urlencoded  ( instead of multipart/form-data )

Also review the following communities post :
Vaibhav Jain's profile image
Vaibhav Jain
Hi Prashansa,

Please select the appropriate content type (example for PDF application/pdf) and select the file and your should be able to replicate the behavior same as postman or soapUI

Premalatha Gadde's profile image
Broadcom Employee Premalatha Gadde
See the knowledge article Configuring data file in REST Step
Vaibhav Jain's profile image
Vaibhav Jain
Hope your issue got resolved with the provided responses, please let us know if still facing any issues.