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

REST API - POST Accept parameters - How to get pain text

grahamall
Newbie

REST API - POST Accept parameters - How to get pain text

Hi All

I need to created a REST serves that responds with plain text.

The API is (Appkey omitted for clarity)

<myServer>/Thingworx/Things/WWXWaterwaySensorTestDataGenerator/Services/OutputTest?method=Post

If I make the request without a Accept parameter I get a web/html page

<myServer>/Thingworx/Things/WWXWaterwaySensorTestDataGenerator/Services/OutputTest?method=Post&Accept=text/xml

I can use either accept=Application/JSON, Text/XML, Text/CSV to get JSON, XML or a CSV file but I really want just the text.  If I use text/plan I get HTML - which is not what I'd expect.

Is it possible to get plain text and if so what are the correct accept parameters?

Thanks

Tags (3)
Announcements

Check out the upcoming Expert Session: Understanding ThingWorx Navigate Licensing in Community "Customer Events" section.