pre_request_flow
2016-08-01 04:20:50 0 举报
pre_request_flow是API网关中的一个功能,它允许用户在请求被路由到后端服务之前对请求进行预处理。这个功能可以用于执行一些通用的操作,例如验证令牌、修改请求头或查询数据库等。通过使用pre_request_flow,用户可以将一些重复的逻辑从各个后端服务中抽离出来,从而提高代码的可重用性和可维护性。此外,pre_request_flow还可以帮助用户实现一些安全性和性能方面的优化。总之,pre_request_flow是一个非常实用的功能,它为用户提供了一种简单而高效的方式来处理API请求。
作者其他创作
大纲/内容
User confirms?
No
Yes
TTS_pre_request_2: no car in realtime
- TTS_pre_request_3: confirm the eta- UI_pre_request_1: show the eta & map
- TTS_pre_request_6: report end of the process; ask the user to request a car again
Confirm more than 3 times?
User rejects?
Connect to: request flow
Surge pricing?
TTS_pre_request_4: confirm the eta & surge multiplier
UberX available in real-time?
- Go to idle screen- TTS_pre_request_5: confirm to cancel
Pre-request flow: start
UberX service available in the local city?
TTS_pre_request_1: no car in town
(handled by confirmation module)- Time out after 15 seconds- Go to screen saver
Correct multiplier?
TTS_pre_request_7: request to input the surge multiplier again
UI_pre_request_2: show the surge multiplier and surge icon
0 条评论
下一页