我在将数据传递给 Vuejspost方法时遇到问题。我正在使用 vue-resource 并且在文档中是:
this.$http.post('/someUrl', [body], [options]).then(successCallback, errorCallback);
Run Code Online (Sandbox Code Playgroud)
我想放置标题并且它可以正常工作(服务器读取标题正确):
this.$http.post(
'http://localhost:8081/login',
{
headers: {
'Accept': 'application/json'
}
});
Run Code Online (Sandbox Code Playgroud)
但是如果我尝试添加任何数据就会出错,例如我尝试过:
this.$http.post(
'http://localhost:8081/login',
{username: 'admin'},
{
headers: {
'Accept': 'application/json'
}
});
Run Code Online (Sandbox Code Playgroud)
或定义一些数据并放在那里,例如:
this.$http.post(
'http://localhost:8081/login',
this.data,
{
headers: {
'Accept': 'application/json'
}
});
Run Code Online (Sandbox Code Playgroud)
并且对于这两种解决方案,主体部分始终为空 - 使用以下方法检查请求中的主体数据:
body = req.getReader().lines().collect(Collectors.joining(System.lineSeparator()));
Run Code Online (Sandbox Code Playgroud)
可能问题出在 vue.js 代码中,因为它工作正常,我从 Postman 发送任何请求。我该怎么办?
我正在运行一个命令来启动 AVD,但是,当设备启动时 - 卡在这个错误上。
撤销 Google App 的麦克风权限。
有什么线索吗?我正在使用 AVD 设备 API 28
运行这些命令时出现同样的错误:
/Users/username/Library/Android/sdk/emulator/emulator -avd Pixel_XL_API_28
/Users/username/Library/Android/sdk/tools/emulator -avd Nexus_S_API_28
Run Code Online (Sandbox Code Playgroud)
模拟器:撤销 Google App 的麦克风权限。
我创建了一个 docusaurus 项目。一切正常。我在登陆页面添加了材质 ui 搜索栏。我正在使用 github actions 来部署项目(CI/CD)。现在,当我推送代码时,我收到此错误。
[ERROR] TypeError: dep.getModuleEvaluationSideEffectsState is not a function
at NormalModule.getSideEffectsConnectionState (/github/workspace/website/node_modules/webpack/lib/NormalModule.js:1126:23)
at /github/workspace/website/node_modules/webpack/lib/optimize/SideEffectsFlagPlugin.js:244:19
at Hook.eval [as call] (eval at create (/github/workspace/website/node_modules/tapable/lib/HookCodeFactory.js:19:10), <anonymous>:12:16)
at Hook.CALL_DELEGATE [as _call] (/github/workspace/website/node_modules/tapable/lib/Hook.js:14:14)
at Compilation.seal (/github/workspace/website/node_modules/webpack/lib/Compilation.js:2804:42)
at /github/workspace/website/node_modules/webpack/lib/Compiler.js:1187:20
at /github/workspace/website/node_modules/webpack/lib/Compilation.js:2757:4
at _next2 (eval at create (/github/workspace/website/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:35:1)
at eval (eval at create (/github/workspace/website/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:71:1)
at /github/workspace/website/node_modules/webpack/lib/FlagDependencyExportsPlugin.js:385:11
Run Code Online (Sandbox Code Playgroud)
我不知道如何解决这个问题。我还附加了 package.json 文件。
[ERROR] TypeError: dep.getModuleEvaluationSideEffectsState is not a function
at NormalModule.getSideEffectsConnectionState (/github/workspace/website/node_modules/webpack/lib/NormalModule.js:1126:23)
at /github/workspace/website/node_modules/webpack/lib/optimize/SideEffectsFlagPlugin.js:244:19
at Hook.eval [as call] (eval at create (/github/workspace/website/node_modules/tapable/lib/HookCodeFactory.js:19:10), …Run Code Online (Sandbox Code Playgroud)javascript ×2
android ×1
c# ×1
command-line ×1
docusaurus ×1
reactjs ×1
vue.js ×1
winforms ×1
wpf ×1