错误:写 EPROTO 34557064:error:100000f7:SSL 例程:OPENSSL_internal:WRONG_VERSION_NUMBER:../../third_party/boringssl/src/ssl/tls_record.cc:242:

Aye*_*han 60 javascript api node.js

问题是当该 API 实际上仅支持 HTTP 时,我试图 POST 到 https。将此作为可能遇到相同问题的其他人的注释。

任何帮助都值得赞赏

Kra*_*mar 106

当您使用https而不是http时会出现这种类型的问题。更改 URL 以使用http

例子: https://localhost:3000/posts

将其更改为: http://localhost:3000/posts

  • ..如果我们**需要**使用 HTTPS 怎么办?从这方面来说,这不是一个很有帮助的答案。 (3认同)
  • 怎么会这样呢?对于其他与 HTTPS 一起使用的方法,只有一种方法让我遇到了问题标题中所述的错误。 (2认同)

Sha*_*rad 18

当我们正在使用的 API 在 http 上运行并且我们尝试使用 https 时,就会出现此错误。信息真的很有用。

示例:使用此 https://localhost:8092/customers,当此 http://localhost:8092/customers 时,必须使用此 API,因为 API 在 http 上运行。


小智 12

error-write-eproto-34557064error100000f7ssl-routinesopenssl-internalwrong

https://localhost:5000/users
Run Code Online (Sandbox Code Playgroud)

将 HTTPS 替换为 HTTP