REST 将多个输入传递给 GET 方法 [英] REST pass multiple inputs to GET method

查看:38
本文介绍了REST 将多个输入传递给 GET 方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在 RAD 中部署了一个简单的基于 REST 的应用程序.

I have deployed a simple REST based application in RAD.

一个简单的 URL 使用 http://localhost//users/ 访问,其中 使用 访问>reqeust.getAttributes().现在,我如何将多个属性传递给 REST 服务?

A simple URL is accessed using http://localhost/<contextroot>/users/<username> where <username> is accessed using reqeust.getAttributes(). Now, how do i pass more than one attribute to the REST service?

推荐答案

通常你会使用查询参数:

Usually you'll use query parameters:

http://localhost/<contextroot>/users/<username>?a=10&b=hello

您尚未指明您使用的是哪种语言或框架,因此我无法在代码中告诉您如何执行此操作.

You haven't indicated which language or framework you are using so I can't tell you how to do this in code.

这篇关于REST 将多个输入传递给 GET 方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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