mark UserProcessHosts
启动代码这样写
HttpServer.Prefixes.Add("http://127.0.0.1:8888/")
HttpServer.Start()
HttpServer.UserProcessHosts.add("127.0.0.1")
httprequest代码这样写
Select Case e.Path
Case "test.htm", ""
Dim body As New System.IO.StreamReader(e.Request.InputStream, encoding.utf8)
Dim value As String = body.ReadToEnd
msgbox(value)
End Select
测试发送数据这样写
Dim hc As New HttpClient("http://127.0.0.1:8888/test.htm")
hc.Content = "<?xml version=""1.0"" encoding=""utf-8"" ?><abc>123</abc>"
hc.ContentType = "application/x-www-form-urlencoded"
Dim ret As String = hc.GetData()