如何使用http请求查询apache http文件服务器中的文件列表

时间:2017-07-22 00:30:13

标签: apache http

有一个Apache Http Server,路径中有两个文件,如下所示:

  

的http:// {apache的端点} /repo/artifacts/file/file-1.2.3/

     

file1的
  file2的

我想调用一个http请求来获取路径中的所有文件。 我尝试使用url发送http get请求

  

的http:// {apache的端点} /repo/artifacts/file/file-1.2.3/

只获得一个html页面。我只想得到两个文件名。

1 个答案:

答案 0 :(得分:0)

我想你需要目录浏览。将以下内容添加到您的网站配置中:

<Directory /repo/artifacts/file/file-1.2.3>
    Options +Indexes
</Directory>