kriskowal / q-io

Interfaces for IO using Q promises in JavaScript on Node

Home Page:http://documentup.com/kriskowal/q-io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Negotiator HTTP apps do not specify a response argument

trevorparscal opened this issue · comments

Using a Negotiator HTTP App, like ContentType, fails because of a missing argument in the method signature of the returned application function.

I'm noticing a lot of cases in the code, especially as I try and use it, where request and response are listed in reverse order, or only response is listed causing essentially the same issue. Are you open to pull-requests that correct these many inconsistencies?

Some of these cases are deliberate. Feel free to point out the cases that
are contentious and I’d be glad to explain each. At some point, I could use
some help shoring up the documentation.

On Mon, Sep 29, 2014 at 11:52 PM, Trevor Parscal notifications@github.com
wrote:

I'm noticing a lot of cases in the code, especially as I try and use it,
where request and response are listed in reverse order, or only response is
listed causing essentially the same issue. Are you open to pull-requests
that correct these many inconsistencies?


Reply to this email directly or view it on GitHub
#118 (comment).

There are instances of Q.when( app, function ( response ) {} ) that make sense, but take HttpApps.Trap, where you reverse the order of request and response - what is going on there?

That was an ergonomic decision. Traps usually only work with the response
and either return it or replace it. The request is not always useful for
traps, but provided in case it is needed.

On Tue, Sep 30, 2014 at 9:39 AM, Trevor Parscal notifications@github.com
wrote:

There are instances of Q.when( app, function ( response ) {} ) that make
sense, but take HttpApps.Trap, where you reverse the order of request and
response - what is going on there?


Reply to this email directly or view it on GitHub
#118 (comment).