About 5,530,000 results
Open links in new tab
  1. How do I do a HTTP GET in Java? - Stack Overflow

    If you dont want to use external libraries, you can use URL and URLConnection classes from standard Java API. An example looks like this: String urlString = …

  2. Simplest way to call REST API and parse JSON data with Java

    Aug 2, 2019 · In Java, I want to call the URL and get the href Strings as a List. In JavaScript, I would simply write. .then(data => data.json()) .then(data => { const items = data. .collection. …

  3. Do a Simple HTTP Request in Java - Baeldung

    Mar 26, 2025 · In this quick tutorial, we present a way of performing HTTP requests in Java — by using the built-in Java class HttpUrlConnection. Note that starting with JDK 11, Java provides …

  4. Getting JSON Data From a RESTful API Using JAVA - Medium

    Aug 2, 2020 · First let’s set the URL object and type cast it into an HttpURLConnection object so that we can set request types and get response codes back. Since we’re only going to get …

  5. Java HTTP GET/POST Request Example Tutorial - Java Guides

    This tutorial shows how to send a GET and a POST request in Java. We use built-in HttpURLConnection class and Apache HttpClient class.

  6. Send a GET request in Java - restful-api.dev

    A Tutorial on how to send the HTTP GET request in Java to the REST API and fetch a response as an object

  7. 5 Ways to Call An API in Java - Medium

    Apr 6, 2023 · All the examples below will query the same API available at https://jsonplaceholder.typicode.com/users. By the way, I highly recommend this site for those …

  8. How to make API calls in Java?

    May 24, 2022 · We will use the HttpRequest package from the Java SDK to create an API call. So let’s import it at the top of the file. To handle the response we will receive from the …

  9. How To Use an API with Java (Java API Tutorial For Beginners)

    Aug 21, 2024 · There are many different types of requests that API could handle, but here are the most used ones: GET – returns data from the server. The most popular request by the way. …

  10. Send JSON data in an HTTP GET request to a REST API from JAVA code

    Using below code you should be able to invoke any rest API. Make a class called RestClient.java which will have method for get and post. public static <T> T post(String url,T data,T t){ try { …

  11. Some results have been removed
Refresh