cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Raw Text into Body on REST Post

pcoleman
New Contributor III

We have an API thatโ€™s expecting raw text as the body of the call and Iโ€™m not clear on how to get SnapLogic to pass the data as raw unformatted text. If I map my text into $content and then pass that to the API
image

The problem is that when I look at how this is being passed, the receiving API is getting this:
image

I need it to be somehow stripped down to:
SELECT * from ENTRY
without the [โ€œโ€]

I understand that SnapLogic deals in JSON, so Iโ€™m not sure how I get around a system that doesnโ€™t want itโ€™s data that way. Iโ€™ve looked into passing it as JSON, but they donโ€™t seem to accommodate it.

1 ACCEPTED SOLUTION

pcoleman
New Contributor III

I should have remembered this because I used batch size=0 to solve this sort of problem before but Support steered me in this direction:
image

This worked and removed the json formatting around the raw text.

View solution in original post

9 REPLIES 9

viktor_n
Contributor II

Hi @pcoleman,

Does you get same result even if you send it as string directly from HTTP entity ?
Instead of $content send it as hardcoded string value.

Regards,
Viktor

pcoleman
New Contributor III

Was a good idea, but unfortunately it seems to pass with the [โ€œโ€] still.

viktor_n
Contributor II

If you havenโ€™t tried to send content-type in headers, try this content-type: text/plain

pcoleman
New Contributor III

image
Had it this wayโ€ฆunfortunatelyโ€ฆno difference.