Car Data

פרמיום
Verified
על ידי Principal APIs | מְעוּדכָּן 22 दिन पहले | Data
פּוֹפּוּלָרִיוּת

9.6 / 10

חֶבִיוֹן

986ms

רמת שירות

100%

Health Check

N/A

חזרה לכל הדיונים

java intergration

Rapid account: Abdallah Bilal
AbdallahBilal
24 дня назад

how do i create a search function. where I can search a make and it gives me all the related models? how do i integrate this into my code using its api keys etc. below is something close to what im looking for

public static ApiResponse getDataFromAPIQuick(String searchName) {
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(“https://car-data.p.rapidapi.com/cars?limit=25&page=0&make=”+ searchName))
.header(“X-RapidAPI-Key”, “b57e9e276fmsh1f36cc4d7866312p116353jsn1cd48ceedd7e”)
.header(“X-RapidAPI-Host”, “car-data.p.rapidapi.com”)
.method(“GET”, HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}

הצטרף לדיון - הוסף תגובה למטה:

התחבר / הירשם כדי לפרסם תגובות חדשות