We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
本文分为四个部分,分别对应源码的四个文件。
context暴露了一个对象,包含了多个方法,并将request和response的方法代理到自己身上。
this.app继承自event.emitter,通过error事件触发onerror。onerror方法将取得的error code设置为传入err的status,默认为500,在设置完http相应的长度、状态码及body后,发送该响应至用户。
143~191行,通过delegate方法将response的request的方法绑定至context上。
The text was updated successfully, but these errors were encountered:
No branches or pull requests
本文分为四个部分,分别对应源码的四个文件。
依赖
源码分析
context暴露了一个对象,包含了多个方法,并将request和response的方法代理到自己身上。
onerror
this.app继承自event.emitter,通过error事件触发onerror。onerror方法将取得的error code设置为传入err的status,默认为500,在设置完http相应的长度、状态码及body后,发送该响应至用户。
request和response
143~191行,通过delegate方法将response的request的方法绑定至context上。
The text was updated successfully, but these errors were encountered: