|
板凳
楼主 |
发表于 2018-5-23 10:55:38
|
只看该作者
还是有问题; 我之前是用的 System.Net.HttpVersion.Version11, 改成了10还是不行;
以下是我的源代码,我用的是VB.NET
麻烦再帮我看一下,十分感谢!
Dim url = "https://api.keepa.com/product?key=456&domain=1&asin=DSAFEWQFDSA"
Try
Dim hp As HttpHelper = New HttpHelper
Dim item As HttpItem = New HttpItem
With item
.URL = url
.Method = "Get"
.ReadWriteTimeout = 300000
.IsToLower = False
.KeepAlive = True
.Accept = "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
'.UserAgent = ""
.ContentType = "application/x-www-form-urlencoded"
'.Referer = ""
.Allowautoredirect = True
'.Postdata &= "&Signature=" & UrlEncode(Sign(stringToSign, algorithm), False)
.ResultType = ResultType.Byte
'.ProtocolVersion = System.Net.HttpVersion.Version11
.ProtocolVersion = System.Net.HttpVersion.Version10
End With
Dim result As HttpResult = hp.GetHtml(item)
MessageBox.Show(dLeft(result.Html, 500))
Catch ex As Exception
MessageBox.Show(ex.Message.ToString)
End Try |
|