首页 > 解决方案 > Save response of web service to JSON text files in batch

问题描述

i have a web service JSON in Azure and there i request the following:

http://mywebsite.com/details/(GAMECODE)/(LANGUAGE)

this information is static and since i have a lot of games i want to off-load the server what means i want to store the response of each request as an text file, like such:

http://mywebsite.com/detailsStatic/345673/ENGLISH.json
http://mywebsite.com/detailsStatic/345673/DUTCH.json
http://mywebsite.com/detailsStatic/345673/GERMAN.json
http://mywebsite.com/detailsStatic/345674/ENGLISH.json
http://mywebsite.com/detailsStatic/345674/DUTCH.json
http://mywebsite.com/detailsStatic/345674/GERMAN.json

etc etc

Each file of course holds the JSON response data, how would i be able to do this automatically for each gamecode and save the responses in different text files in a single folder? Is there a program that would be able to do this in a batch (run a long list of excel copied inside as example?) or should can i do it with code? Postman just allows me one by one so that no good idea :)

Who has some good leads that i could follow? Websites to read about or idea`s to get me in the right direction? Thanks

标签: sqljsonrestazureweb

解决方案


您可以使用 curl、wget 或aria2 之类的工具来下载文件列表。看到这个命令aria2c -j5 -i list.txt


推荐阅读