Skip to content
Myr

Added callback query check on response.send to autowrap JSON objects for simple webservice implementations

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Dav Glass · committed by Tj Holowaychuk · parent 95ebbf2 · Browse files · 1 file+3 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+3 added−0 removed

  • other:+3 added−0 removed

1 file+3 added−0 removed

modified:lib/express/response.js+3 added
82 unmodified lines
83 if (!this.headers['Content-Type']) {84 this.contentType('.json');85 }86 body = JSON.stringify(body);87 if (this.req.query.callback) {88 body = this.req.query.callback + '(' + body + ');';89 }90 }91 break;92 }93
270 unmodified lines