I have the following CURL request. Can someone please acknowledge what will be the subesquest HTTP request.
curl -u "Login-dummy:password-dummy" -H "X-Requested-With: Curl" "https://qualysapi.qualys.eu/api/2.0/fo/report/?action=list" -k
Will it be something like?
String url = "https://qualysapi.qualys.eu/api/2.0/fo/report/"; URL obj = new URL(url); HttpURLConnection con = (HttpURLConnection) obj.openConnection(); // optional default is GET con.setRequestMethod("GET"); ..... //incomplete
Can anyone please be kind enough to help me completely convert the curl request above to httpreq.
Thanks in advance.
Suvi
java curl
user2686807
source share