我需要将XML文件发布到HTTPS网址 [英] I have a need to post a XML file to a HTTPS url
本文介绍了我需要将XML文件发布到HTTPS网址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这是我在VB 6中所做的,我想在vb.net中做同样的事情
Here's what I did i VB 6 and I want to do the same in vb.net
Dim obj As MSXML2.XMLHTTP60
Dim request_string As String
obj.Open "POST", "https://apitest.authorize.net/xml/v1/request.api", False
obj.setRequestHeader "Content-Type", "text/xml"
obj.send request_string
VB6正常工作.
这是我在VB.NET中尝试过的方法,但是不起作用.
Here's what I tried in VB.NET and does not work.
Dim myhttp
myhttp = CreateObject("Msxml2.XMLHTTP.3.0")
Dim strholdcontents
strholdcontents = xml.ToString()
MyHttp.open("POST", "https://apitest.authorize.net/xml/v1/request.api", False)
MyHttp.setRequestHeader("Content-Type", "text/xml")
myhttp.send(strholdcontents)
VB.NET代码将不会发布.
The VB.NET code will not post.
可以帮忙吗?
谢谢
推荐答案
你好伦纳德,
我相信发布@ VB.NET论坛会更有用:
I believe it'll be more helpful to post @ the VB.NET forums:
http://social.msdn.microsoft.com/Forums/en-US/category /visualbasic
hth
Marcelo
这篇关于我需要将XML文件发布到HTTPS网址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文