سؤال

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

You can make HTTP request directly from your BHO code. Check this article for code samples

نصائح أخرى

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);
                }
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top