-
-
Notifications
You must be signed in to change notification settings - Fork 192
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
res.getHeader function does not exist #117
Comments
Express has
Thank you! |
It's a module called lasso https://github.com/lasso-js/lasso which I'm trying to use. Itself uses send for it's middleware. |
I replaced res.getHeader(... with just res.get(... and it seemed to work. Got another error though. Fair enough nodejs does have it: https://nodejs.org/api/http.html#http_response_getheader_name |
Ah, I see. The
Not true; At the top of that section, it says:
And Node.js response object (linked to in those docs) has Regardless, the issue is that you're not using lasso correctly, and the error that occurs in this module is just a symptom of that issue. |
@dougwilson Ah. I failed to mention that I have a pull request waiting for the lasso bug with koa: lasso-js/lasso#163 So it does work (with my fix). The next issue is Send now, which is why I started this issue. So what your saying is that send does not support koa? |
No, I'm saying that lasso didn't. |
@dougwilson Ok gotcha! Just wanted your view on the whole thing! |
No problem, @basickarl I hope that all made sense :) |
I'm wondering if this module is not up to date?
Express uses the following to set headers: http://expressjs.com/en/4x/api.html
States:
res.set('Content-Type', 'text/html');
. Same goes for koajs.Can't see any getHeader function either in expressjs nor koajs.
The text was updated successfully, but these errors were encountered: