【发布时间】:2021-10-24 10:23:23
【问题描述】:
我的 api 在 PostMan 中工作,但没有反应并显示此错误
未指定应用程序加密密钥
fetch(URL, {
method: 'post',
headers: {
Accept: 'application/json',
'Content-Type': 'application/x-www-form-urlencoded',
'Content-Language': 'en', },
body: formUrlEncoded(data),
})
【问题讨论】:
-
在你的控制台中使用这个命令`php artisan key:generate`这将生成应用程序密钥,然后你就可以使用它了。
-
请求头的key怎么填?
-
它会自动设置。试试这个命令,你会看到需要的结果