Forum
Please or Register to create posts and topics.

Not Json, I need Text format

hello, it's me again 🙂

When I send a request to "http://localhost:54664/sample", it returns me in json format. But it should come to me in text format. Taking json and translating it extends my processing time. Is there a structure like "http://localhost:54664/sample?format=string" ?

"Text" is not a format, just a way to encode values. JSON is a text-based format. What other format are you looking for?

application/json

I want to change "Content-Type". By default I get application/json format. I want to change it to "text/html".

text/html

 

Sorry, but exporting measurement data as HTML doesn't make much sense for an API. It would result in massive bandwidth and processing overhead, while not really adding anything useful (parsing HTML is way more complex than parsing JSON). If your plan is to save processing time, HTML is certainly not the way to go. The only benefit would be better compatibility with browsers, but that's hardly worth the downsides.