Car Data

फ्रीमियम
द्वारा Principal APIs | अपडेट किया गया a month ago | Data
लोकप्रियता

9.6 / 10

लेटेंसी

960ms

सेवा का स्तर

100%

Health Check

N/A

सभी चर्चाओं पर वापस जाएं

java intergration

Rapid account: Abdallah Bilal
AbdallahBilal
a month ago

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());
}

चर्चा में शामिल हों - नीचे टिप्पणी जोड़ें:

नई टिप्पणियाँ पोस्ट करने के लिए लॉग इन / साइनअप करें