You can make HTTP request directly from your BHO code. Check this article for code samples
How to Call localhost service from ATL VC++ BHO
题
From ATL VC++ BHO i want to call http://localhost:8888
with some post data and receive data back from it. Basically IE extension would need to call HTTP POST request. From BHO code if I inject javascript and there add AJax post call this is not allowed because of cross site restrictions. Any suggestions on this ?
解决方案 2
其他提示
Thanks,
Following code works for C# BHO :-
using (var wb = new WebClient())
{
var data = new NameValueCollection();
data["user"] = "D";
data["id"] = "E";
data["token"] = "token";
var response = wb.UploadValues("http://localhost:8888", "POST", data);
}
不隶属于 StackOverflow