Forum Discussion

richie's avatar
richie
Community Hero
8 years ago

POSTING plain text via a property to a REST Service

Hi,   I feel a bit of a dunce posting this message,  cos it should be straight forward - but it;s not working!   I have a REST resource, method, request setup which I intend to POST to, but the c...
  • StevenColon's avatar
    8 years ago

    Hello Richie, 

     

    Thanks for posting in the SmartBear Community Forum.

     

    The error you are receiving is due to the message body not being in XML format.

     

    To solve the immediate error, you should modify the body to:

    <file_contents>${#TestSuite#fileContents}</file_contents>

     

    As a side note, I would recommend sending the data as an attachment since it is easier to manage  if the data gets larger (if that is the case). https://support.smartbear.com/readyapi/docs/projects/requests/attachment/rest.html