获得错误无法执行' fetch'在' window':无效的名称
我正在尝试在WSO2 API管理器中发布API。但是我正在使用授权密钥使用基本安全性。我遇到类型错误:在“窗口”上无法执行“获取”:无效的名称。我试图更改Swagger文件。但是没有得到所需的回应。
I am trying to publish API in wso2 API Manager. But I am using basic security with my authorization key. I am getting a type error: Failed to execute 'fetch' on 'Window': Invalid name. I tried to change the swagger file. But didn't get the required response.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您试图通过APIM将标题发送到后端,则将其定义为发布者门户中资源下的标题。
但是,如果您的标题名称为授权,则必须使用某种调解将其发送给您的后端。例如,
如果将上述内容添加到您的序列中,则必须将一个名为“自定义”的标头发送,并带有您需要发送到后端的密钥。然后,在从APIM发送请求时,APIM将用授权标头替换此自定义标头。
如果您已启用了在APIM中创建的API的基本验证,则需要遵循[1]调用API。
If you are trying to send a header to your backend through APIM, you have define it as a header under resources in the Publisher portal.
However, if the name of your header is Authorization you will have to use some sort of a mediation to send this to your backend. For example,
If you add the above to your in-sequences, you will have to send a header called Custom with the key you need to send to the backend. Then APIM will replace this Custom header with Authorization header when sending the request out from APIM.
If you have enabled Basic auth for your API created in APIM, you need to follow [1] to invoke the API.