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

Need respond method with Content-Type header specified in method #4

Open
vanevery opened this issue Oct 8, 2014 · 0 comments
Open

Comments

@vanevery
Copy link
Collaborator

vanevery commented Oct 8, 2014

/**

  • Respond to the request, specifying the type of data that is being served.
    *
  • @method respond
  • @param {String} response
  • @example
    request.respond("Thanks", "text/plain");
    */
    Response.prototype.respond = function(str, contentType) {
    this.response.writeHead(200, {'Content-Type': contentType});
    this.response.end(str);
    };
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