从经典的 asp 页面调用 REST web 服务 [英] Calling REST web services from a classic asp page

查看:34
本文介绍了从经典的 asp 页面调用 REST web 服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想开始将我们的应用程序业务层移动到 REST Web 服务集合中.但是,我们的大部分 Intranet 都是使用 Classic ASP 构建的,我工作的大多数开发人员都使用 Classic ASP 进行编程.理想情况下,为了让他们受益于一组独特的 Web API 的优势,必须从经典 ASP 页面调用它.

I'd like to start moving our application business layers into a collection of REST web services. However, most of our Intranet has been built using Classic ASP and most of the developers where I work keep programming in Classic ASP. Ideally, then, for them to benefit from the advantages of a unique set of web APIs, it would have to be called from Classic ASP pages.

我一点也不知道该怎么做.

I haven't the slightest idea how to do that.

推荐答案

您可以结合使用 JQuery 和 JSON 调用来使用来自客户端的 REST 服务

You could use a combination of JQuery with JSON calls to consume REST services from the client

如果您需要从 ASP 层与 REST 服务进行交互,您可以使用

if you need to interact with the REST services from the ASP layer you can use

MSXML2.ServerXMLHTTP

MSXML2.ServerXMLHTTP

喜欢:

Set HttpReq = Server.CreateObject("MSXML2.ServerXMLHTTP")
HttpReq.open "GET", "Rest_URI", False
HttpReq.send

这篇关于从经典的 asp 页面调用 REST web 服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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