cancel
Showing results for 
Search instead for 
Did you mean: 

Adding an application/json attachment to a REST request

Occasional Visitor

Adding an application/json attachment to a REST request

I'm trying to add a json-file as an attachment to a REST-request, but it keeps converting the content type to text/javascrip instead of application/json. How can the attachment content type be changed to application/json? Literally tried everything by now.

2 REPLIES 2
Community Hero

Re: Adding an application/json attachment to a REST request

Hey @papercuts

Did you view the help on this?

https://support.smartbear.com/readyapi/docs/projects/requests/attachment/soap.html

And

https://support.smartbear.com/readyapi/docs/projects/requests/attachment/rest.html

I know you already mentioned .json so this is REST but i added the soap attachments help as well for context.

Cheers,

richie
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
Community Hero

Re: Adding an application/json attachment to a REST request

Not sure what all you tried.

Have you used custom property? say have ${#TestCase#TYPE} as value and define a custom property at test case level, TYPE and value as "application/json"?

Even you could parameterize the file path / filename etc.,


Regards,
Rao.