我曾尝试使用Visual Basic进行发布请求,但是代码不起作用。 也许有人发现了错误?
Dim strURL As String
Dim objHTTP
Dim myxml As String
Dim xmlhttpResponse As New Xml.XmlDocument
myxml = "<?xml version=""1.0"" encoding=""UTF-8""?>" & _
"<findItemsByKeywordsRequest xmlns=""http://www.ebay.com/marketplace/search/v1/services"">" & _
"<keywords>potter</keywords>" & _
"</findItemsByKeywordsRequest>"
strURL = "https://svcs.ebay.com/services/search/FindingService/v1"
objHTTP = CreateObject("Microsoft.xmlhttp")
objHTTP.Open("POST", strURL, False)
objHTTP.setRequestHeader("X-EBAY-SOA-SECURITY-APPNAME", "xxxxxxxxxxxxxxxxxxxxxxxx")
objHTTP.setRequestHeader("X-EBAY-SOA-OPERATION-NAME", "findItemsByKeywords")
objHTTP.send(myxml)
xmlhttpResponse = objHTTP.responseXML
xmlhttpRoot = xmlhttpResponse.DocumentElement
XMLResponse = objHTTP.responseText
MsgBox(XMLResponse)
xmlhttpResponse = objHTTP.responseXML
End Sub