HTTP URL Address Encoding in Java

前端 未结 26 1391
醉酒成梦
醉酒成梦 2020-11-22 01:35

My Java standalone application gets a URL (which points to a file) from the user and I need to hit it and download it. The problem I am facing is that I am not able to encod

26条回答
  •  难免孤独
    2020-11-22 02:10

    Maybe can try UriUtils in org.springframework.web.util

    UriUtils.encodeUri(input, "UTF-8")
    

提交回复
热议问题