All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.dominodatalab.pub.rest.ProjectsFilesApiExtended Maven / Gradle / Ivy

Go to download

Domino Data Lab API Client to connect to Domino web services using Java HTTP Client.

There is a newer version: 6.0.1.0
Show newest version
package com.dominodatalab.pub.rest;

import java.io.IOException;
import java.io.InputStream;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

import com.dominodatalab.pub.invoker.ApiClient;
import com.dominodatalab.pub.invoker.ApiException;
import com.dominodatalab.pub.invoker.ApiResponse;

public class ProjectsFilesApiExtended extends ProjectsFilesApi {

    public ProjectsFilesApiExtended() {
        super();
    }

    public ProjectsFilesApiExtended(ApiClient client) {
        super(client);
    }

    @Override
    public ApiResponse getProjectFileContentsWithHttpInfo(String projectId, String commitId, String path) throws ApiException {
        HttpRequest.Builder localVarRequestBuilder = getProjectFileContentsRequestBuilder(projectId, commitId, path);
        try {
            HttpResponse localVarResponse = memberVarHttpClient.send(
                    localVarRequestBuilder.build(),
                    HttpResponse.BodyHandlers.ofInputStream());
            if (memberVarResponseInterceptor != null) {
                memberVarResponseInterceptor.accept(localVarResponse);
            }
            if (localVarResponse.statusCode() / 100 != 2) {
                // Get the stack trace
                throw getApiException("ProjectFileContents", localVarResponse);
            }
            return new com.dominodatalab.pub.invoker.ApiResponse<>(
                    localVarResponse.statusCode(),
                    localVarResponse.headers().map(),
                    localVarResponse.body()
            );
        } catch (IOException e) {
            throw new com.dominodatalab.pub.invoker.ApiException(e);
        } catch (InterruptedException e) {
            Thread.currentThread().interrupt();
            throw new com.dominodatalab.pub.invoker.ApiException(e);
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy