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

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

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

grahamall
1-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

0 REPLIES 0
Top Tags