⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 test.sh

📁 resetful样式的ws样例,一种面向资源的webservices服务
💻 SH
字号:
#!/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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -