Making a HTTP request to API possible with VB/ASP classic?

混江龙づ霸主 提交于 2019-12-08 01:03:43

问题


Is it possible to make requests to a Web API with ASP classic?

For example just something as simple as the Flickr API, or was this sort of thing not supported way back when?


回答1:


It's quite possible:

Dim req
Set req = Server.CreateObject("MSXML2.ServerXMLHTTP")

req.open "GET", "http://blabla.com", False
req.send()

Response.Write(req.responseText)

You should be able to find examples of how to parse XML and JSON here on stackoverflow.com



来源:https://stackoverflow.com/questions/2883444/making-a-http-request-to-api-possible-with-vb-asp-classic

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!