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

Revisit method of passing responseType #51

Closed
natevw opened this issue Aug 7, 2014 · 2 comments
Closed

Revisit method of passing responseType #51

natevw opened this issue Aug 7, 2014 · 2 comments

Comments

@natevw
Copy link
Owner

natevw commented Aug 7, 2014

I think it's clear that this needs to be controllable. What's not clear is if the right solution is:

  • expose only to plugins (they have the "internalish" request object to set it on…but this would be the only option not also exposed via the "main" API)
  • expose as a new argument (as currently on 'upcoming' branch)
  • expose via X-Fermata-ResponseType header (c.f. Revisit/document use of X-Status-Code in autoConvert metadata #36)

Almost leaning towards the latter at the moment…

@natevw
Copy link
Owner Author

natevw commented Aug 8, 2014

Another idea: "annotated" callbacks, e.g. url.post(data, fermata.stream(cb))

Meta-idea: a plugin can change req.responseType on its way to a transport. Perhaps first figuring out how plugins can get mixed-in later (#30) and then revisiting streams/promises would be a better design approach.

@natevw
Copy link
Owner Author

natevw commented Feb 21, 2015

This might be an event better idea: add an opts param to the left of headers. This might be the most general-purpose way, since putting things like this into 'X-Fermata-' headers ends up being frustratingly verbose. (This might also help address things like #16 and #31 and #49 and perhaps even https://github.com/natevw/fermata/issues/30…)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant