VS Code 编译任务问题

  • Creator 版本:2.1.4
  • 操作系统:win10专业版

curl : 无法分析响应内容,因为 Internet Explorer 引擎不可用,或者 Internet Explorer 的首次启动配置不完整。请指定 UseBasicParsing 参数,然后再试一
次。
所在位置 行:1 字符: 1

  • curl http://localhost:7456/update-db
  •   + CategoryInfo          : NotImplemented: (:) [Invoke-WebRequest], NotSupportedException
      + FullyQualifiedErrorId : WebCmdletIEDomNotSupportedException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
    
    

The terminal process terminated with exit code: 1

Terminal will be reused by tasks, press any key to close it.

“args”: ["-UseBasicParsing", “http://localhost:7456/update-db”],

task.json里添加参数“-UseBasicParsing”,可以解决问题。

Executing task: curl -UseBasicParsing http://localhost:7456/update-db <

StatusCode : 200
StatusDescription : OK
Content : Changes submitted
RawContent : HTTP/1.1 200 OK
Connection: keep-alive
Content-Length: 17
Content-Type: text/html; charset=utf-8
Date: Sat, 16 Nov 2019 03:36:25 GMT
ETag: W/“11-8cjFDx1ChB9ujzsJcu5UHg”
X-Powered-By: Express

                ...

Forms :
Headers : {[Connection, keep-alive], [Content-Length, 17], [Content-Type, text/html; charset=utf-8], [Date, Sat, 16 Nov 2019 03:36:25 G
MT]…}
Images : {}
InputFields : {}
Links : {}
ParsedHtml :
RawContentLength : 17

Terminal will be reused by tasks, press any key to close it.

1赞

非常好用,这个我在之前的电脑上没问题,这个电脑上就有。
用了上面的方法,完美解决。非常感谢。
我的版本是2.1.3 同是win10系统