You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, when a response has a Content-Type: text/plain response header, the only way to access the text is to use resource.$response.data directly. It would be nicer if we had a new TextExtension that could handle text content types and populate a special text field with the response body, so instead you can just use: resource.text once the request resolves.
I think by default it should only handle text/plain subtype, but should allow optional parameter for set of subtypes handled, or an empty set if all 'text/*' content types should be handled.
The text was updated successfully, but these errors were encountered:
petejohanson
changed the title
Add aTextExtension for processing text/* (e.g. text/plain) responses.
Add a TextExtension for processing text/* (e.g. text/plain) responses.
Jun 9, 2016
Currently, when a response has a
Content-Type: text/plain
response header, the only way to access the text is to useresource.$response.data
directly. It would be nicer if we had a newTextExtension
that could handle text content types and populate a specialtext
field with the response body, so instead you can just use:resource.text
once the request resolves.I think by default it should only handle
text/plain
subtype, but should allow optional parameter for set of subtypes handled, or an empty set if all 'text/*' content types should be handled.The text was updated successfully, but these errors were encountered: