使用 VB/ASP 经典版可以向 API 发出 HTTP 请求吗? [英] Making a HTTP request to API possible with VB/ASP classic?

查看:30
本文介绍了使用 VB/ASP 经典版可以向 API 发出 HTTP 请求吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以使用 ASP classic 向 Web API 发出请求?

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

例如只是像 Flickr API 这样简单的东西,或者这种东西在什么时候不支持?

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

推荐答案

很有可能:

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

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

Response.Write(req.responseText)

您应该能够在 stackoverflow.com 上找到有关如何解析 XML 和 JSON 的示例

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

这篇关于使用 VB/ASP 经典版可以向 API 发出 HTTP 请求吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆