test.sh

来自「resetful样式的ws样例,一种面向资源的webservices服务」· Shell 代码 · 共 67 行

SH
67
字号
#!/bin/shecho -- Get the containersjava -jar dist/StorageService.jar GET http://127.0.0.1:9998/storage/containersechoecho -- Create the quotes containerjava -jar dist/StorageService.jar PUT http://127.0.0.1:9998/storage/containers/quotesechoecho -- Get the containersjava -jar dist/StorageService.jar GET http://127.0.0.1:9998/storage/containersechoecho -- Add some quotesecho "Something is rotten in the state of Denmark" | java -jar dist/StorageService.jar PUT http://127.0.0.1:9998/storage/containers/quotes/1 text/plainecho "I could be bounded in a nutshell" | java -jar dist/StorageService.jar PUT http://127.0.0.1:9998/storage/containers/quotes/2 text/plainecho "catch the conscience of the king" | java -jar dist/StorageService.jar PUT http://127.0.0.1:9998/storage/containers/quotes/3 text/plainecho "Get thee to a nunnery" | java -jar dist/StorageService.jar PUT http://127.0.0.1:9998/storage/containers/quotes/4 text/plainechoecho -- Get the quotes containerjava -jar dist/StorageService.jar GET http://127.0.0.1:9998/storage/containers/quotesechoecho -- Search the quotes container for content that contains 'king'java -jar dist/StorageService.jar GET http://127.0.0.1:9998/storage/containers/quotes?search=kingechoecho -- Get the 3rd quote in the quotes containerjava -jar dist/StorageService.jar GET http://127.0.0.1:9998/storage/containers/quotes/3echoecho -- Update the 3rd quoteecho "The play's the thing Wherein I'll catch the conscience of the king" | java -jar dist/StorageService.jar PUT http://127.0.0.1:9998/storage/containers/quotes/3 text/plainechoecho -- Get the 3rd quote in the quotes containerjava -jar dist/StorageService.jar GET http://127.0.0.1:9998/storage/containers/quotes/3echoecho -- Search the quotes container for content that contains 'king'java -jar dist/StorageService.jar GET http://127.0.0.1:9998/storage/containers/quotes?search=kingechoecho -- Delete the 3rd quotejava -jar dist/StorageService.jar DELETE http://127.0.0.1:9998/storage/containers/quotes/3echoecho -- Delete the quotes containerjava -jar dist/StorageService.jar DELETE http://127.0.0.1:9998/storage/containers/quotesechoecho -- Get the containersjava -jar dist/StorageService.jar GET http://127.0.0.1:9998/storage/containersechoecho -- Add something using more than one path segmentecho "Something" | java -jar dist/StorageService.jar PUT http://127.0.0.1:9998/storage/containers/quotes/a/b/c/d text/plainecho -- Get the quote a/b/c/djava -jar dist/StorageService.jar GET http://127.0.0.1:9998/storage/containers/quotes/a/b/c/dechoecho -- Delete the quotes containerjava -jar dist/StorageService.jar DELETE http://127.0.0.1:9998/storage/containers/quotesecho

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?