Skip to content

Commit

Permalink
RequestStatus.java: Apply Spotless to format code
Browse files Browse the repository at this point in the history
  • Loading branch information
datalogics-kam committed Apr 25, 2024
1 parent d9c4754 commit 4c53375
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions Java/Endpoint Examples/Multipart Payload/RequestStatus.java
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import io.github.cdimascio.dotenv.Dotenv;
import java.io.IOException;
import java.util.concurrent.TimeUnit;

import io.github.cdimascio.dotenv.Dotenv;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;
import org.json.JSONObject;

public class RequestStatus {

// Request UUIDs can be found in the JSON response of POST requests as "requestId" when API Polling is enabled.
// Request UUIDs can be found in the JSON response of POST requests as "requestId" when API
// Polling is enabled.
// Resource UUIDs usually look like this: '0950b9bdf-0465-4d3f-8ea3-d2894f1ae839'.
private static final String REQUEST_ID =
"2e3c603d1-30b2-4c16-8c11-911a51bb2ba9"; // place requestID here
Expand All @@ -18,13 +18,12 @@ public class RequestStatus {
// You can also put the environment variable in a .env file.
private static final String DEFAULT_API_KEY = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx";

public static void main(String[] args) {
public static void main(String[] args) {

final Dotenv dotenv = Dotenv.configure().ignoreIfMalformed().ignoreIfMissing().load();

String urlString =
String.format("https://api.pdfrest.com/request-status/%s", REQUEST_ID);


String urlString = String.format("https://api.pdfrest.com/request-status/%s", REQUEST_ID);

Request request =
new Request.Builder()
.header("Api-Key", dotenv.get("PDFREST_API_KEY", DEFAULT_API_KEY))
Expand Down

0 comments on commit 4c53375

Please sign in to comment.