Is there a Java package to handle building URLs?

前端 未结 3 603
孤街浪徒
孤街浪徒 2020-12-05 18:32

What I\'m looking for specifically is some code in Java that will take a Map object and convert it into a query string that I can append to a URL I return. I\'

3条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-05 19:11

    There's this online, so you can simply call any of:

    InputStream serverInput = post(URL url, Map parameters); 
    InputStream serverInput = post(URL url, Map parameters); 
    InputStream serverInput = post(URL url, Map cookies, Map parameters); 
    InputStream serverInput = post(URL url, String[] cookies, Object[] parameters); 
    InputStream serverInput = post(URL url, Object[] parameters).
    

    He provides the source code too.

提交回复
热议问题