Open bystro opened 6 years ago
Hello @bystro !
I'm not sure to get the issue. You want to test plain text response ? What is the use case ?
I am not convinced of the interest of adding it to the project. It is over generic and not and in general you want to make specific test for your scenario.
As you did, you can easily do it at your application level, so may be it is enough ?
@tyx Ajax's XMLHttpRequest has it in response
and responseText
property:
https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/response
https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/responseText
If you return only one value(for example generated UUID) it is convenient to return it responseText as plain text string instead of json with only one property.
We can think about better communication the issue maybe?
Thanks for the details !
At the origin, we wanted to have an extension to help us to test rest api. So XMLHttpRequest stuff was not in the initial scope, and I'm sure other extension make this job no?
But if many people use this one to other stuff that testing rest api, we can consider to extend the initial scope may be. Need to think about it.
Regarding to XMLHttpRequest it was only an example. There are more https://futurestud.io/tutorials/retrofit-2-receive-plain-string-responses https://angular.io/guide/http
My example use case is the following.
When I send request to create new resource I'm waiting for 201 Created
in response header and get new resource id as a plain text value from response content - no need to play with json format.