Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a TextExtension for processing text/* (e.g. text/plain) responses. #19

Closed
petejohanson opened this issue Jun 9, 2016 · 0 comments
Closed

Comments

@petejohanson
Copy link
Owner

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.

@petejohanson 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant