Ask a Question

Trying to send a file , not an attachment, using REST API call, the api accepts a filestream object

SOLVED
Joydeep
New Contributor

Trying to send a file , not an attachment, using REST API call, the api accepts a filestream object

The File is PDF file, Programatically the Body wil look like this 


body = [file:FileObj, name:'file']

 

The test step looks like this [Soap help 1.png]

 

The same step in postman can be done as this[Soap help 2.png]

2 REPLIES 2
richie
Community Hero

Hi @Joydeep,

I had a similar issue about 6 months ago where i use the form-data type in Postman and used the equivalent in ReadyAPI! and i remember it being quite fiddly to get it to work.

I'll have to dig the post i submitted out, but in the meantime if you look at your screenshots, we cant actually determine anything from the detail youve provided which could help diagnose the issue.

Consider the postman pic....youve blanked the full URI, not just the server. We would need to know all the uri/template and query parameters as well as headers before we could really help. From a security perspective as long as you dont supply the auth details along with the servername....thats all you need to hide, but (depending on the issue and especially this formdata issue) we'd need to understand the full URI (so full URL excepting the server).

Whilst i find the post (that explains what i was doing wrong) i raised and until you give us a bit more info, i think i remember setting up the formdata parms as query parms in ReadyAPI! and i think i used the 'Post Querystring' checkbox.....but i'm stretching my memory a bit here!

Cheers,

Rich
if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta
Joydeep
New Contributor

This worked, all the parameters were not in sync

 

cancel
Showing results for 
Search instead for 
Did you mean: