我正在编写一个要在 Linux 设备上运行的 bash 脚本,因此我无权安装 jq,我需要能够使用本机 Linux 工具
curl --location --request POST "https://api-mp.meraki.com/api/v1/networks/12345/switch/stacks/12345/routing/interfaces" \
--header "X-Cisco-Meraki-API-Key: 123key" \
--header "Content-Type: application/json" \
--data '{
"name": "L3 int",
"subnet": "192.168.249.0/24",
"interfaceIp": "192.168.249.2",
"multicastRouting": "disabled",
"vlanId": 140,
"ospfSettings": {
"area": "0",
"cost": 1,
"isPassiveEnabled": true
}
}' | sed -n 's|.*"interfaceID":"\([^"]*\)".*|\1|p' > $newVar
Run Code Online (Sandbox Code Playgroud)
服务器的响应返回以下内容:
{
"interfaceId": "12345",
"name": "PA L3 DR Int",
"subnet": "192.168.249.0/24",
"interfaceIp": "192.168.249.2",
"multicastRouting": "disabled",
"vlanId": 140,
"ospfSettings": {
"area": "0",
"cost": 1,
"isPassiveEnabled": true
}
}
Run Code Online (Sandbox Code Playgroud)
然后我需要能够访问查询字符串参数中的interfaceID新变量
嘿,我有一个 Web 套接字部署到 AWS API 网关,带有自定义域和 lambda 支持它。当我尝试通过我的 Angular 应用程序与其进行交互时,我不断在 Web 控制台中收到此错误:
WebSocket connection to 'wss://customDomain/' failed: Error during WebSocket handshake: Unexpected response code: 403
Run Code Online (Sandbox Code Playgroud)
我没有在 API Gateway 的日志中看到任何东西,比如任何东西试图击中它,并且 lambda 端没有函数调用。
我有一个网关部署,我可以说一切都设置正确。我正在尝试使用 AWS-CDK 将这个 apigateway 从共享的旧 AWS 账户移动到新账户,以便我可以从代码级别确认设置应该是正确的。