Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://api.plexi.com.br/api/maestro/........"))
    .header("Content-Type", "application/json")
    .header("Accept", "application/json")
    .header("Callback", "string")
    .header("Authorization", "Bearer {chave-api}")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n\t\"renavam\": \"99999\"\n}"))
    .build();
HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());

  • No labels