From a921715b8651810a0b567830eabdda1c0d719ee1 Mon Sep 17 00:00:00 2001 From: wangyaqi Date: Thu, 11 Aug 2022 17:01:57 +0800 Subject: [PATCH] docs: update uniCloud http trigger --- docs/uniCloud/http.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/uniCloud/http.md b/docs/uniCloud/http.md index e5454bd3c..5b57c2d20 100644 --- a/docs/uniCloud/http.md +++ b/docs/uniCloud/http.md @@ -355,8 +355,9 @@ content-length: 9897 在云函数中使用cookie需要依赖cookie库[npm页面地址](http://https://www.npmjs.com/package/cookie),可以通过`npm inistall cookie` 安装 +**普通云函数示例** + ```js -// 普通云函数 'use strict'; //引入cookie const cookie = require('cookie') @@ -378,8 +379,11 @@ exports.main = async (event, context) => { body: '返回数据' } }; +``` -// 云对象 +**云对象示例** + +```js 'use strict'; //引入cookie const cookie = require('cookie') -- GitLab