Post方法在边缘浏览器中不起作用,但在其他浏览器(如Firefox)中起作用. IE浏览器,Chrome

问题描述:

我正在努力在边缘浏览器中使用post方法,而对于相同的请求,我正在其他浏览器(例如Internet Explorer,Chrome,Firefox)中获得响应,但在Edge中却没有. 虽然我做了很多分析,但我不知道为什么发帖请求不能仅在边缘工作 我对在网络标签中看到的行为有疑问.

I am struggling with a post method in edge browser, while for same request i am getting response in other browsers like Internet explorer, chrome, Firefox but not in edge. While i have done lot of analysis but i could not figure out why post request is not working only in edge doubt which i have regarding behavior seen in network tabs.

请找到网络"标签的附件快照(我已从屏幕快照中删除了某些策略的网址和名称) 现在的问题是 1.为什么在协议选项卡中尽管显示HTTPS仍显示待处理",而在结果选项卡中仅显示待处理"也未显示任何状态,而在启动器选项卡中却显示获取"

Please find attached snapshot of network tab(I have removed url and name from screenshot for some policy) Now question is 1. Why in protocol tab despite of showing HTTPS it is showing "Pending" and in result tab it is also not showing any status just "Pending" and in Initiator tab it is showing "Fetch"

现在我要在Firefox浏览器中附加相同的请求

Now i am attaching same request in firefox browser

在此图中,我们可以看到请求标头和响应标头的完整信息

In this picture we can see complete information of request header and response header

到此为止,我发现有关此请求的所有信息都正确,但是我不知道为什么它不起作用,一个疑问是我在响应标头中

Till this point i find everything right about this request but i don't know why it is not working one doubt that i have is in response header we have

Access-Control-Allow-Methods: GET, POST, OPTIONS

我们是否还需要在这里添加FETCH? 我在这里还有一个疑问,在这个项目中正在使用iframe广告代码,这可能是造成这种情况的原因吗?

Do we need to add FETCH also here? Another doubt i have here that in this project iframe tag is getting used could this be possible cause for this ?

我是否需要对请求标头或响应标头进行任何更改?还是我需要某种配置

Do i need to make any change in my request header or response header ? or do i need some kind of configuration

我正在使用角度7 感谢您提供任何帮助,如有任何进一步的解释,请发表评论,以便我澄清 预先感谢

I am using angular 7 Any help is appreciated for any further explanation please comment so that i can clarify Thanks in advance

注意:在进行一些研究时,我发现对于边缘浏览器,我们需要以已经完成的字符串格式发送请求

Note: While doing some research i found that for edge browser we need to send request in string format which i have already done

在对我的代码库进行了一些研究之后,我发现代码没什么错,比发现后还好,这是Microsoft Edge浏览器版本42上的未解决问题. -Edge使用content-encoding:identity将请求/响应无限期地标记为待处理请求–可以在下面链接中提到的Microsoft官方网站上找到问题

After doing some research on my code base i found that there is nothing wrong in code, than after found, This is open issue on Microsoft edge browser version 42, -Edge marks a request/response as pending indefinitely requests with content-encoding:identity – Issue can be found on Microsoft official website mentioned in below link

边缘将请求/响应标记为待处理

我在Microsoft Edge浏览器的Dev通道和canary通道上测试了相同的请求,它在哪里正常工作,这意味着在Microsoft Edge的将来版本中,此问题将得到解决. Dev频道和Canary频道的边缘可以在下面的链接中找到

Than i tested same request on Dev channel and canary channel of Microsoft edge browser where is it working fine, which means in future release of Microsoft edge this issue will be fixed. Edge for Dev channel and canary channel can be found on below link

下载Microsoft Edge Canary/dev频道