我必須從VB6調用REST服務。我跟着這個帖子 Get/post to RESTful web service,但不能實現太多。調用Rest服務的VB6應用程序
我迄今所做的是:
Dim sUrl As String
Dim response As String
Dim xmlhttp
sUrl = "myserviceurl"
xmlhttp = CreateObject("MSXML2.xmlhttp")
xmlhttp.open "GET", sUrl, False
xmlhttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
Set xmlhttp = Nothing
有加MSXML6我的項目引用。
我得到這個錯誤:
Object doesnt support this Method..
字符串 「SURL」 似乎是問題給我。你可以嘗試把實際網址的路徑? – DevelopmentIsMyPassion 2013-02-13 20:23:36
..它不是問題,因爲我可以調試後,以及.Sorry我不能把我的生產網址由於一些擔心。 – 2013-02-13 20:25:09
你在哪一行出錯? – DevelopmentIsMyPassion 2013-02-13 20:25:54