当前位置:网站首页>第八章 通过 REST 使用 Web 会话(Sessions)
第八章 通过 REST 使用 Web 会话(Sessions)
2022-07-27 19:37:00 【yaoxin521123】
第八章 通过 REST 使用 Web 会话(Sessions)
可以启用 REST 服务以使用 Web 会话。本章描述了为什么以及如何做到这一点。
介绍
REST 的目标之一是无状态;也就是说,从一个 REST 调用到下一个,没有任何知识存储在服务器上。跨 REST 调用保留 Web 会话会破坏无状态范式,但可能希望保留 Web 会话的原因有两个:
- 最小化连接时间——如果每个
REST调用创建一个新的Web会话,它需要在服务器上建立一个新的会话。通过保留Web会话,REST调用可以更快地连接。 - 跨
REST调用保留数据 — 在某些情况下,可能需要跨REST调用保留数据才能有效满足业务需求。
启用 REST 服务以使用 Web 会话
要启用对多个 REST 调用使用单个 Web 会话,请在规范类中将 UseSession 参数设置为 1。例如:
Parameter UseSession As Integer = 1;
然后重新编译这个类
如果 UseSession 为 1, IRIS 跨多个 REST 服务调用保留一个 Web 会话。如果参数为 0(默认值), IRIS 为每个 REST 服务调用使用一个新的 Web 会话。
注意:当重新编译规范类时,UseSession 参数被复制到调度类,这会导致行为的实际变化。
边栏推荐
- Vs2019 release mode debugging: this expression has side effects and will not be evaluated.
- Drawing three coordinate (axis) diagram with MATLAB
- 【StoneDB故障诊断】MDL锁等待
- leetcode15--三数之和
- C language output teaching calendar
- cocos:ccpDistance函数的简单运用以及实现眼球随着手指在眼眶中转动的功能
- redis学习
- Leetcode-226-flip binary tree
- 【图解】三次握手,四次挥手 —— 用心看这一篇就够了
- 项目分析(从技术到项目、产品)
猜你喜欢

【图解】三次握手,四次挥手 —— 用心看这一篇就够了

软件测试的就业前景到底怎么样?

Inertial navigation principle (VII) -imu error classification (II) -allan variance analysis method +imu test + calibration introduction

Starfish OS X metabell strategic cooperation, metauniverse business ecosystem further

It's too voluminous. A company has completely opened its core system (smart system) that has been operating for many years

CMOS传输门原理及应用

STM32项目分享---MQTT智能门禁系统(含APP控制)

JVM memory model interview summary

Starrocks community structure comes out, waiting for you to upgrade!

leetcode383赎金信
随机推荐
电磁继电器
Drawing three coordinate (axis) diagram with MATLAB
Matlab 绘制风速、风向统计玫瑰花图
Live video source code, uni app to achieve advertising scroll bar
Are Transformers Effective for Time Series Forecasting?|填坑
Window localStorage 属性和Location 对象
matlab 绘制三坐标(轴)图
ThreadLocal principle and source code analysis (click in step by step, don't recite, learn ideas)
electromagnetic relay
Leetcode-309- best time to buy and sell stocks, including freezing period
Interview question: what are the functions of fail safe mechanism and fail fast mechanism
[OBS] P B frame loss threshold buffer_ duration_ usec
Project analysis (from technology to project and product)
【StoneDB故障诊断】MDL锁等待
Reentranlock and source code analysis (learn ideas and click the source code step by step)
Leetcode-199-right view of binary tree
Read Plato farm's eplato and the reason for its high premium
Station B collapsed. If we were the developer responsible for the repair that night
固体继电器
Credit default prediction based on simplified scorecard, smote sampling and random forest