import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

// RapidAPI header  https://rapidapi.com/dariuxmx/api/formula-1-standings/
HttpRequest request = HttpRequest.newBuilder()
		.uri(URI.create("https://formula-1-standings.p.rapidapi.com/races"))
		.header("X-RapidAPI-Key", "80e73128e0mshda8c95123266391p176951jsnbc06ff234f92")
		.header("X-RapidAPI-Host", "formula-1-standings.p.rapidapi.com")
		.method("GET", HttpRequest.BodyPublishers.noBody())
		.build();

// RapidAPI request and response
HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());

// RapidAPI Body
System.out.println(response.body());
{"results":[{"race_name":"Pre-Season Testing 2022","race_date":"10 – 12 March 2022","race_location":"Bahrain International Circuit, Bahrain"},{"race_name":"Bahrain Grand Prix 2022","race_date":"18 – 20 March 2022","race_location":"Bahrain International Circuit, Bahrain"},{"race_name":"Saudi Arabian Grand Prix 2022","race_date":"25 – 27 March 2022","race_location":"Jeddah Corniche Circuit, Saudi Arabia"},{"race_name":"Australian Grand Prix 2022","race_date":"8 – 10 April 2022","race_location":"Melbourne Grand Prix Circuit, Australia"},{"race_name":"Emilia Romagna Grand Prix 2022","race_date":"22 – 24 April 2022","race_location":"Autodromo Enzo e Dino Ferrari, Italy"},{"race_name":"Miami Grand Prix 2022","race_date":"6 – 8 May 2022","race_location":"Miami International Autodrome, United States"},{"race_name":"Spanish Grand Prix 2022","race_date":"20 – 22 May 2022","race_location":"Circuit de Barcelona-Catalunya, Spain"},{"race_name":"Monaco Grand Prix 2022","race_date":"27 – 29 May 2022","race_location":"Circuit de Monaco, Monaco"},{"race_name":"Azerbaijan Grand Prix 2022","race_date":"10 – 12 June 2022","race_location":"Baku City Circuit, Azerbaijan"},{"race_name":"Canadian Grand Prix 2022","race_date":"17 – 19 June 2022","race_location":"Circuit Gilles Villeneuve, Canada"},{"race_name":"British Grand Prix 2022","race_date":"1 – 3 July 2022","race_location":"Silverstone Circuit, United Kingdom"},{"race_name":"Austrian Grand Prix 2022","race_date":"8 – 10 July 2022","race_location":"Red Bull Ring, Austria"},{"race_name":"French Grand Prix 2022","race_date":"22 – 24 July 2022","race_location":"Circuit Paul Ricard, France"},{"race_name":"Hungarian Grand Prix 2022","race_date":"29 – 31 July 2022","race_location":"Hungaroring, Hungary"},{"race_name":"Belgian Grand Prix 2022","race_date":"26 – 28 August 2022","race_location":"Circuit de Spa-Francorchamps, Belgium"},{"race_name":"Dutch Grand Prix 2022","race_date":"2 – 4 September 2022","race_location":"Circuit Zandvoort, Netherlands"},{"race_name":"Italian Grand Prix 2022","race_date":"9 – 11 September 2022","race_location":"Autodromo Nazionale Monza, Italy"},{"race_name":"Singapore Grand Prix 2022","race_date":"30 September – 2 October 2022","race_location":"Marina Bay Street Circuit, Singapore"},{"race_name":"Japanese Grand Prix 2022","race_date":"7 – 9 October 2022","race_location":"Suzuka International Racing Course, Japan"},{"race_name":"United States Grand Prix 2022","race_date":"21 – 23 October 2022","race_location":"Circuit of the Americas, United States"},{"race_name":"Mexico City Grand Prix 2022","race_date":"28 – 30 October 2022","race_location":"Autodromo Hermanos Rodriguez, Mexico"},{"race_name":"São Paulo Grand Prix 2022","race_date":"11 – 13 November 2022","race_location":"Autódromo José Carlos Pace, Brazil"},{"race_name":"Abu Dhabi Grand Prix 2022","race_date":"18 – 20 November 2022","race_location":"Yas Marina Circuit, United Arab Emirates"}]}