public class PrincipalcomBusca {
public static void main(String[] args) throws IOException, InterruptedException {
Scanner leitura = new Scanner(System.IN);
System.out.println(“Digite o nome do filme para busca: “);
var busca = leitura.nextLine();
String chave = “a7d02689”;
String endereco = “http://www.omdbapi.com/?i=tt3896198&apikey=a7d02689” ;
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder().uri(URI.create(endereco)).build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}