On Thu, Nov 15, 2012 at 5:10 PM, Ben Noordhuis <[email protected]> wrote:
>> function sendFile(response, filePath, fileContents) {
>>
>> response.writeHead(
>>
>> 'content-type',
>>
>> mime.lookup(path.basename(filePath))
>>
>> );
>
> The argument to writeHead() should be a hash.
To avoid further confusion, here is how you use it:
response.writeHead(200, { 'content-type': 'whatever' })
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en