-1

how do i have to write Java code for calling an api with a lot of parameters? I searched everywhere and i didn't found anything. I have to do a call to this site https://md5decrypt.net/en/Api/ but I can't write the java code because I don't know Java libraries that can I use. Can someone help me?

  • There are many easy to use http clients in java. Have a look here: https://stackoverflow.com/questions/6051648/httpclient-in-java?rq=1 – tpschmidt Jun 23 '19 at 09:51

1 Answers1

0

Its Depends which call yo want to make GET or Post.

You can refer this link to make GET or POST call with parameters/headers using HttpClient and HttpURLConnection class.

reference link : https://www.mkyong.com/java/how-to-send-http-request-getpost-in-java/

Very easy and flexible i would recommend Unirest class

    Unirest.post("http://httpbin.org/post")
      .queryString("name", "Mark")
      .field("last", "Polo")
      .asJson()     

reference link : http://unirest.io/java.html

Hope this will help you.

Mak
  • 887
  • 5
  • 16