o2oa api: response | o2oa开发平台-游戏厅捕鱼达人

module

用于服务管理的接口脚本,描述服务的响应对象。

usable range

服务管理-接口

syntax

var res = this.response;

methods

static

setbody(bodyopt, contenttypeopt)

服务返回一个301跳转。

syntax

this.response.setbody(body, contenttype);

parameters

  • body string | object

    响应内容,文本或json对象。

  • contenttype string

    响应头的content-type。

example

//设置json格式的响应内容
this.response.setbody({
    "key1": "value1",
    "key2": "value2"
}, "application/json");

source

网站地图