通过公司提供给工程师的java程序代码,写一个java程序,通过API接口下载数据,然后将数据存在csv文件中
代码样例如下:java OkHttpClient 提取数据的代码
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://XXXXXe-com1.p.rXXXXXXi.com/json/lat/-8.5/lon/125.5/dist/100/")
.get()
.addHeader("x-XXXX-host", "XXXXX-com1.p.XXXXXi.com")
.addHeader("x-XXXXXi-key", "bn7XXX6102ecc")
.build();
Response response = client.newCall(request).execute();