From ff6877052033aa4d30d3351ab0ddf0e98b4043ec Mon Sep 17 00:00:00 2001 From: xrr2016 Date: Wed, 22 Aug 2018 08:44:42 +0800 Subject: [PATCH] =?UTF-8?q?docs():=20mime=20=E6=96=B0=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E7=9A=84=E6=96=B9=E6=B3=95=E5=90=8D=E7=A7=B0=E6=94=B9=E5=8F=98?= =?UTF-8?q?=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Version 2 is a breaking change from 1.x as the semver implies. Specifically: lookup() renamed to getType() extension() renamed to getExtension() charset() and load() methods have been removed --- lesson4/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lesson4/README.md b/lesson4/README.md index bd85a38..7d9a4a9 100644 --- a/lesson4/README.md +++ b/lesson4/README.md @@ -370,7 +370,7 @@ else{ return false } res.writeHead(200, { - 'Content-Type': `${mime.lookup(pathname)};charset:UTF-8` + 'Content-Type': `${mime.getType(pathname)};charset:UTF-8` }) res.write(data, 'binary') res.end()