![](/img/trans.png)
[英]How to send a request to public website which uses POST method and how to find out parameters of the request like source and destination etc
[英]how to send a post request through http in website that uses https?
我正在创建一个 chrome 扩展,它需要通过普通的 http 向服务器发送发布请求,但这会导致混合内容错误,并且当我在用户 Https 的网站中时,浏览器不处理请求。
错误信息:
混合内容:“https://www.google.com/”上的页面已通过 HTTPS 加载,但请求了不安全的 XMLHttpRequest 端点“http://example.se:8080/v1/check”。 此请求已被阻止; 内容必须通过 HTTPS 提供。
var settings = {
"url": "http://example.se:8080/v1/check",
"method": "POST",
"timeout": 0,
"headers": {
"postman-token": "e7705111-e7d7-0284-e4cd-56115243e076",
"Content-Type": "application/json"
},
"data": JSON.stringify({"langCode":"pt-rr","text":"Por favor, leia as regrs. Meu nom é Nicolas. bowré o qunto maor pabn dks do."}),
};
$.ajax(settings).done(function (response) {
console.log(response);
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.