知识卡片

操作参考卡 · 5165

栈保存当前任务的变量

理解等级:中级

STACK PUSH <JSON对象>把变量压入后进先出栈,PEEK查看栈顶、SET更新栈顶,POP移除,LEN查看深度。EXPAND-ARRAY把栈顶数组展开,PUSH WITH-PATH <path>从选择结果取值。这个栈承载本地任务变量,与SHOW管理的响应历史分开;不能把弹出变量误当成删除远端资源。

这张卡片看不懂?

已有反馈 · 0 / 10 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • 附录D:HyperCLI操作参考 · 查看原书依据

      STACK JSON object LIFO stack .. CLEARǀFLUSH Clears all the items from the stack .. PEEK Displays the JSON object at the top of the stack .. PUSH <{ n:v,… }> Adds a new JSON object to the stack .. PUSH WITH-RESPONSE Adds a new item on the stack from the top of the response stack .. PUSH WITH-PATH <path-stringǀ$#> Adds a new item on the stack that is the result of the JSONPATH .. EXPAND-ARRAY Expands the array on the top of the stack into n-items on the stack .. POP Removes the top item from the stack .. LENǀLENGTH Returns depth of the stack .. SET <{"n”:"v”,…}> Updates the JSON object on the top of the stack .. LOADǀFILE [filename] Reads a single JSON object from disk onto the stack (defaults to hyper.stack) .. SAVEǀWRITE [filename] Writes the top item on the stack to disk (defaults to hyper.stack) .. DUMP [filename] Writes the full stack to disk (defaults to hyper.dump) .. FILL [filename] Replaces the current stack with contents in disk file (defaults to hyper.dump)

    参考来源

    - 位置:《RESTful Web API Patterns and Practices Cookbook》Appendix D. Using the HyperCLI(来源项目book-sources,源文件:extracted/RESTful Web API Patterns and Practices Cookbook Connecting and Orchestrating Microservices and Distributed Data (Mike Amundsen)/_epub-src/OEBPS/app04.xhtml) - 结论依据:原文直接给出相应职责、操作或比较;本卡保留其用途与适用边界,不将历史接口表述当作当前工具验证。 - 原始内容:STACK JSON object LIFO stack .. CLEARǀFLUSH Clears all the items from the stack .. PEEK Displays the JSON object at the top of the stack .. PUSH <{ n:v,… }> Adds a new JSON object to the stack .. PUSH WITH-RESPONSE Adds a new item on the stack from the top of the response stack .. PUSH WITH-PATH <path-stringǀ$#> Adds a new item on the stack that is the result of the JSONPATH .. EXPAND-ARRAY Expands the array on the top of the stack into n-items on the stack .. POP Removes the top item from the stack .. LENǀLENGTH Returns depth of the stack .. SET <{"n”:"v”,…}> Updates the JSON object on the top of the stack .. LOADǀFILE [filename] Reads a single JSON object from disk onto the stack (defaults to hyper.stack) .. SAVEǀWRITE [filename] Writes the top item on the stack to disk (defaults to hyper.stack) .. DUMP [filename] Writes the full stack to disk (defaults to hyper.dump) .. FILL [filename] Replaces the current stack with contents in disk file (defaults to hyper.dump)