HTTP requests with basic authentication

前端 未结 4 1733
悲&欢浪女
悲&欢浪女 2020-12-07 23:10

I have to download and parse XML files from http server with HTTP Basic authentication. Now I\'m doing it this way:

URL url = new URL(\"http         


        
4条回答
  •  不思量自难忘°
    2020-12-07 23:49

    Use HttpClient. Documentation for performing downloads with HTTP AUTH is here. Documentation for getting a string result is here. Then, parse your string (ideally using SAX, though, not DOM).

提交回复
热议问题