Class GitLabApiClient


  • public class GitLabApiClient
    extends Object
    This class utilizes the Jersey client package to communicate with a GitLab API endpoint.
    • Method Summary

      Modifier and Type Method Description
      protected javax.ws.rs.client.Client createApiClient()  
      protected javax.ws.rs.core.Response delete​(javax.ws.rs.core.MultivaluedMap<String,​String> queryParams, Object... pathArgs)
      Perform an HTTP DELETE call with the specified form data and path objects, returning a Response instance with the data returned from the endpoint.
      protected javax.ws.rs.core.Response delete​(javax.ws.rs.core.MultivaluedMap<String,​String> queryParams, URL url)
      Perform an HTTP DELETE call with the specified form data and URL, returning a Response instance with the data returned from the endpoint.
      protected javax.ws.rs.core.Response get​(javax.ws.rs.core.MultivaluedMap<String,​String> queryParams, Object... pathArgs)
      Perform an HTTP GET call with the specified query parameters and path objects, returning a ClientResponse instance with the data returned from the endpoint.
      protected javax.ws.rs.core.Response get​(javax.ws.rs.core.MultivaluedMap<String,​String> queryParams, URL url)
      Perform an HTTP GET call with the specified query parameters and URL, returning a ClientResponse instance with the data returned from the endpoint.
      protected URL getApiUrl​(Object... pathArgs)
      Construct a REST URL with the specified path arguments.
      boolean getIgnoreCertificateErrors()
      Returns true if the API is setup to ignore SSL certificate errors, otherwise returns false.
      protected URL getUrlWithBase​(Object... pathArgs)
      Construct a REST URL with the specified path arguments using Gitlab base url.
      protected javax.ws.rs.core.Response getWithAccepts​(javax.ws.rs.core.MultivaluedMap<String,​String> queryParams, String accepts, Object... pathArgs)
      Perform an HTTP GET call with the specified query parameters and path objects, returning a ClientResponse instance with the data returned from the endpoint.
      protected javax.ws.rs.core.Response getWithAccepts​(javax.ws.rs.core.MultivaluedMap<String,​String> queryParams, URL url, String accepts)
      Perform an HTTP GET call with the specified query parameters and URL, returning a ClientResponse instance with the data returned from the endpoint.
      protected javax.ws.rs.core.Response head​(javax.ws.rs.core.MultivaluedMap<String,​String> queryParams, Object... pathArgs)
      Perform an HTTP HEAD call with the specified query parameters and path objects, returning a ClientResponse instance with the data returned from the endpoint.
      protected javax.ws.rs.core.Response head​(javax.ws.rs.core.MultivaluedMap<String,​String> queryParams, URL url)
      Perform an HTTP HEAD call with the specified query parameters and URL, returning a ClientResponse instance with the data returned from the endpoint.
      protected javax.ws.rs.client.Invocation.Builder invocation​(URL url, javax.ws.rs.core.MultivaluedMap<String,​String> queryParams)  
      protected javax.ws.rs.client.Invocation.Builder invocation​(URL url, javax.ws.rs.core.MultivaluedMap<String,​String> queryParams, String accept)  
      protected javax.ws.rs.core.Response post​(Object payload, Object... pathArgs)
      Perform an HTTP POST call with the specified payload object and URL, returning a ClientResponse instance with the data returned from the endpoint.
      protected javax.ws.rs.core.Response post​(javax.ws.rs.core.Form formData, Object... pathArgs)
      Perform an HTTP POST call with the specified form data and path objects, returning a ClientResponse instance with the data returned from the endpoint.
      protected javax.ws.rs.core.Response post​(javax.ws.rs.core.Form formData, URL url)
      Perform an HTTP POST call with the specified form data and URL, returning a ClientResponse instance with the data returned from the endpoint.
      protected javax.ws.rs.core.Response post​(javax.ws.rs.core.MultivaluedMap<String,​String> queryParams, Object... pathArgs)
      Perform an HTTP POST call with the specified form data and path objects, returning a ClientResponse instance with the data returned from the endpoint.
      protected javax.ws.rs.core.Response post​(javax.ws.rs.core.MultivaluedMap<String,​String> queryParams, URL url)
      Perform an HTTP POST call with the specified form data and URL, returning a ClientResponse instance with the data returned from the endpoint.
      protected javax.ws.rs.core.Response post​(javax.ws.rs.core.StreamingOutput stream, String mediaType, Object... pathArgs)
      Perform an HTTP POST call with the specified StreamingOutput, MediaType, and path objects, returning a ClientResponse instance with the data returned from the endpoint.
      protected javax.ws.rs.core.Response put​(javax.ws.rs.core.Form formData, Object... pathArgs)
      Perform an HTTP PUT call with the specified form data and path objects, returning a ClientResponse instance with the data returned from the endpoint.
      protected javax.ws.rs.core.Response put​(javax.ws.rs.core.Form formData, URL url)
      Perform an HTTP PUT call with the specified form data and URL, returning a ClientResponse instance with the data returned from the endpoint.
      protected javax.ws.rs.core.Response put​(javax.ws.rs.core.MultivaluedMap<String,​String> queryParams, Object... pathArgs)
      Perform an HTTP PUT call with the specified form data and path objects, returning a ClientResponse instance with the data returned from the endpoint.
      protected javax.ws.rs.core.Response put​(javax.ws.rs.core.MultivaluedMap<String,​String> queryParams, URL url)
      Perform an HTTP PUT call with the specified form data and URL, returning a ClientResponse instance with the data returned from the endpoint.
      protected javax.ws.rs.core.Response putUpload​(String name, File fileToUpload, Object... pathArgs)
      Perform a file upload using multipart/form-data using the HTTP PUT method, returning a ClientResponse instance with the data returned from the endpoint.
      protected javax.ws.rs.core.Response putUpload​(String name, File fileToUpload, URL url)
      Perform a file upload using multipart/form-data using the HTTP PUT method, returning a ClientResponse instance with the data returned from the endpoint.
      void setIgnoreCertificateErrors​(boolean ignoreCertificateErrors)
      Sets up the Jersey system ignore SSL certificate errors or not.
      protected javax.ws.rs.core.Response upload​(String name, File fileToUpload, String mediaTypeString, Object... pathArgs)
      Perform a file upload using the specified media type, returning a ClientResponse instance with the data returned from the endpoint.
      protected javax.ws.rs.core.Response upload​(String name, File fileToUpload, String mediaTypeString, javax.ws.rs.core.Form formData, Object... pathArgs)
      Perform a file upload using the specified media type, returning a ClientResponse instance with the data returned from the endpoint.
      protected javax.ws.rs.core.Response upload​(String name, File fileToUpload, String mediaTypeString, javax.ws.rs.core.Form formData, URL url)
      Perform a file upload using multipart/form-data, returning a ClientResponse instance with the data returned from the endpoint.
      protected boolean validateSecretToken​(javax.ws.rs.core.Response response)
      Validates the secret token (X-GitLab-Token) header against the expected secret token, returns true if valid, otherwise returns false.
    • Constructor Detail

      • GitLabApiClient

        public GitLabApiClient​(GitLabApi.ApiVersion apiVersion,
                               String hostUrl,
                               String privateToken)
        Construct an instance to communicate with a GitLab API server using the specified GitLab API version, server URL, private token, and secret token.
        Parameters:
        apiVersion - the ApiVersion specifying which version of the API to use
        hostUrl - the URL to the GitLab API server
        privateToken - the private token to authenticate with
      • GitLabApiClient

        public GitLabApiClient​(GitLabApi.ApiVersion apiVersion,
                               String hostUrl,
                               Constants.TokenType tokenType,
                               String authToken)
        Construct an instance to communicate with a GitLab API server using the specified GitLab API version, server URL, auth token type, private or access token, and secret token.
        Parameters:
        apiVersion - the ApiVersion specifying which version of the API to use
        hostUrl - the URL to the GitLab API server
        tokenType - the type of auth the token is for, PRIVATE or ACCESS
        authToken - the token to authenticate with
      • GitLabApiClient

        public GitLabApiClient​(String hostUrl,
                               String privateToken)
        Construct an instance to communicate with a GitLab API server using GitLab API version 4, and the specified server URL, private token, and secret token.
        Parameters:
        hostUrl - the URL to the GitLab API server
        privateToken - the private token to authenticate with
      • GitLabApiClient

        public GitLabApiClient​(String hostUrl,
                               Constants.TokenType tokenType,
                               String authToken)
        Construct an instance to communicate with a GitLab API server using GitLab API version 4, and the specified server URL, private token, and secret token.
        Parameters:
        hostUrl - the URL to the GitLab API server
        tokenType - the type of auth the token is for, PRIVATE or ACCESS
        authToken - the token to authenticate with
      • GitLabApiClient

        public GitLabApiClient​(GitLabApi.ApiVersion apiVersion,
                               String hostUrl,
                               String privateToken,
                               String secretToken)
        Construct an instance to communicate with a GitLab API server using the specified GitLab API version, server URL, private token, and secret token.
        Parameters:
        apiVersion - the ApiVersion specifying which version of the API to use
        hostUrl - the URL to the GitLab API server
        privateToken - the private token to authenticate with
        secretToken - use this token to validate received payloads
      • GitLabApiClient

        public GitLabApiClient​(GitLabApi.ApiVersion apiVersion,
                               String hostUrl,
                               Constants.TokenType tokenType,
                               String authToken,
                               String secretToken)
        Construct an instance to communicate with a GitLab API server using the specified GitLab API version, server URL, private token, and secret token.
        Parameters:
        apiVersion - the ApiVersion specifying which version of the API to use
        hostUrl - the URL to the GitLab API server
        tokenType - the type of auth the token is for, PRIVATE or ACCESS
        authToken - the token to authenticate with
        secretToken - use this token to validate received payloads
      • GitLabApiClient

        public GitLabApiClient​(String hostUrl,
                               String privateToken,
                               String secretToken)
        Construct an instance to communicate with a GitLab API server using GitLab API version 4, and the specified server URL, private token, and secret token.
        Parameters:
        hostUrl - the URL to the GitLab API server
        privateToken - the private token to authenticate with
        secretToken - use this token to validate received payloads
      • GitLabApiClient

        public GitLabApiClient​(String hostUrl,
                               Constants.TokenType tokenType,
                               String authToken,
                               String secretToken)
        Construct an instance to communicate with a GitLab API server using GitLab API version 4, and the specified server URL, private token, and secret token.
        Parameters:
        hostUrl - the URL to the GitLab API server
        tokenType - the type of auth the token is for, PRIVATE or ACCESS
        authToken - the token to authenticate with
        secretToken - use this token to validate received payloads
      • GitLabApiClient

        public GitLabApiClient​(String hostUrl,
                               String privateToken,
                               String secretToken,
                               Map<String,​Object> clientConfigProperties)
        Construct an instance to communicate with a GitLab API server using GitLab API version 4, and the specified server URL and private token.
        Parameters:
        hostUrl - the URL to the GitLab API server
        privateToken - the private token to authenticate with
        secretToken - use this token to validate received payloads
        clientConfigProperties - the properties given to Jersey's clientconfig
      • GitLabApiClient

        public GitLabApiClient​(GitLabApi.ApiVersion apiVersion,
                               String hostUrl,
                               String privateToken,
                               String secretToken,
                               Map<String,​Object> clientConfigProperties)
        Construct an instance to communicate with a GitLab API server using the specified GitLab API version, server URL and private token.
        Parameters:
        apiVersion - the ApiVersion specifying which version of the API to use
        hostUrl - the URL to the GitLab API server
        privateToken - the private token to authenticate with
        secretToken - use this token to validate received payloads
        clientConfigProperties - the properties given to Jersey's clientconfig
      • GitLabApiClient

        public GitLabApiClient​(GitLabApi.ApiVersion apiVersion,
                               String hostUrl,
                               Constants.TokenType tokenType,
                               String authToken,
                               String secretToken,
                               Map<String,​Object> clientConfigProperties)
        Construct an instance to communicate with a GitLab API server using the specified GitLab API version, server URL and private token.
        Parameters:
        apiVersion - the ApiVersion specifying which version of the API to use
        hostUrl - the URL to the GitLab API server
        tokenType - the type of auth the token is for, PRIVATE or ACCESS
        authToken - the private token to authenticate with
        secretToken - use this token to validate received payloads
        clientConfigProperties - the properties given to Jersey's clientconfig
    • Method Detail

      • getApiUrl

        protected URL getApiUrl​(Object... pathArgs)
                         throws IOException
        Construct a REST URL with the specified path arguments.
        Parameters:
        pathArgs - variable list of arguments used to build the URI
        Returns:
        a REST URL with the specified path arguments
        Throws:
        IOException - if an error occurs while constructing the URL
      • getUrlWithBase

        protected URL getUrlWithBase​(Object... pathArgs)
                              throws IOException
        Construct a REST URL with the specified path arguments using Gitlab base url.
        Parameters:
        pathArgs - variable list of arguments used to build the URI
        Returns:
        a REST URL with the specified path arguments
        Throws:
        IOException - if an error occurs while constructing the URL
      • validateSecretToken

        protected boolean validateSecretToken​(javax.ws.rs.core.Response response)
        Validates the secret token (X-GitLab-Token) header against the expected secret token, returns true if valid, otherwise returns false.
        Parameters:
        response - the Response instance sent from the GitLab server
        Returns:
        true if the response's secret token is valid, otherwise returns false
      • get

        protected javax.ws.rs.core.Response get​(javax.ws.rs.core.MultivaluedMap<String,​String> queryParams,
                                                Object... pathArgs)
                                         throws IOException
        Perform an HTTP GET call with the specified query parameters and path objects, returning a ClientResponse instance with the data returned from the endpoint.
        Parameters:
        queryParams - multivalue map of request parameters
        pathArgs - variable list of arguments used to build the URI
        Returns:
        a ClientResponse instance with the data returned from the endpoint
        Throws:
        IOException - if an error occurs while constructing the URL
      • get

        protected javax.ws.rs.core.Response get​(javax.ws.rs.core.MultivaluedMap<String,​String> queryParams,
                                                URL url)
        Perform an HTTP GET call with the specified query parameters and URL, returning a ClientResponse instance with the data returned from the endpoint.
        Parameters:
        queryParams - multivalue map of request parameters
        url - the fully formed path to the GitLab API endpoint
        Returns:
        a ClientResponse instance with the data returned from the endpoint
      • getWithAccepts

        protected javax.ws.rs.core.Response getWithAccepts​(javax.ws.rs.core.MultivaluedMap<String,​String> queryParams,
                                                           String accepts,
                                                           Object... pathArgs)
                                                    throws IOException
        Perform an HTTP GET call with the specified query parameters and path objects, returning a ClientResponse instance with the data returned from the endpoint.
        Parameters:
        queryParams - multivalue map of request parameters
        accepts - if non-empty will set the Accepts header to this value
        pathArgs - variable list of arguments used to build the URI
        Returns:
        a ClientResponse instance with the data returned from the endpoint
        Throws:
        IOException - if an error occurs while constructing the URL
      • getWithAccepts

        protected javax.ws.rs.core.Response getWithAccepts​(javax.ws.rs.core.MultivaluedMap<String,​String> queryParams,
                                                           URL url,
                                                           String accepts)
        Perform an HTTP GET call with the specified query parameters and URL, returning a ClientResponse instance with the data returned from the endpoint.
        Parameters:
        queryParams - multivalue map of request parameters
        url - the fully formed path to the GitLab API endpoint
        accepts - if non-empty will set the Accepts header to this value
        Returns:
        a ClientResponse instance with the data returned from the endpoint
      • head

        protected javax.ws.rs.core.Response head​(javax.ws.rs.core.MultivaluedMap<String,​String> queryParams,
                                                 Object... pathArgs)
                                          throws IOException
        Perform an HTTP HEAD call with the specified query parameters and path objects, returning a ClientResponse instance with the data returned from the endpoint.
        Parameters:
        queryParams - multivalue map of request parameters
        pathArgs - variable list of arguments used to build the URI
        Returns:
        a ClientResponse instance with the data returned from the endpoint
        Throws:
        IOException - if an error occurs while constructing the URL
      • head

        protected javax.ws.rs.core.Response head​(javax.ws.rs.core.MultivaluedMap<String,​String> queryParams,
                                                 URL url)
        Perform an HTTP HEAD call with the specified query parameters and URL, returning a ClientResponse instance with the data returned from the endpoint.
        Parameters:
        queryParams - multivalue map of request parameters
        url - the fully formed path to the GitLab API endpoint
        Returns:
        a ClientResponse instance with the data returned from the endpoint
      • post

        protected javax.ws.rs.core.Response post​(javax.ws.rs.core.Form formData,
                                                 Object... pathArgs)
                                          throws IOException
        Perform an HTTP POST call with the specified form data and path objects, returning a ClientResponse instance with the data returned from the endpoint.
        Parameters:
        formData - the Form containing the name/value pairs
        pathArgs - variable list of arguments used to build the URI
        Returns:
        a ClientResponse instance with the data returned from the endpoint
        Throws:
        IOException - if an error occurs while constructing the URL
      • post

        protected javax.ws.rs.core.Response post​(javax.ws.rs.core.MultivaluedMap<String,​String> queryParams,
                                                 Object... pathArgs)
                                          throws IOException
        Perform an HTTP POST call with the specified form data and path objects, returning a ClientResponse instance with the data returned from the endpoint.
        Parameters:
        queryParams - multivalue map of request parameters
        pathArgs - variable list of arguments used to build the URI
        Returns:
        a Response instance with the data returned from the endpoint
        Throws:
        IOException - if an error occurs while constructing the URL
      • post

        protected javax.ws.rs.core.Response post​(javax.ws.rs.core.Form formData,
                                                 URL url)
        Perform an HTTP POST call with the specified form data and URL, returning a ClientResponse instance with the data returned from the endpoint.
        Parameters:
        formData - the Form containing the name/value pairs
        url - the fully formed path to the GitLab API endpoint
        Returns:
        a ClientResponse instance with the data returned from the endpoint
      • post

        protected javax.ws.rs.core.Response post​(javax.ws.rs.core.MultivaluedMap<String,​String> queryParams,
                                                 URL url)
        Perform an HTTP POST call with the specified form data and URL, returning a ClientResponse instance with the data returned from the endpoint.
        Parameters:
        queryParams - multivalue map of request parametersformData the Form containing the name/value pairs
        url - the fully formed path to the GitLab API endpoint
        Returns:
        a ClientResponse instance with the data returned from the endpoint
      • post

        protected javax.ws.rs.core.Response post​(Object payload,
                                                 Object... pathArgs)
                                          throws IOException
        Perform an HTTP POST call with the specified payload object and URL, returning a ClientResponse instance with the data returned from the endpoint.
        Parameters:
        payload - the object instance that will be serialized to JSON and used as the POST data
        pathArgs - variable list of arguments used to build the URI
        Returns:
        a ClientResponse instance with the data returned from the endpoint
        Throws:
        IOException - if an error occurs while constructing the URL
      • post

        protected javax.ws.rs.core.Response post​(javax.ws.rs.core.StreamingOutput stream,
                                                 String mediaType,
                                                 Object... pathArgs)
                                          throws IOException
        Perform an HTTP POST call with the specified StreamingOutput, MediaType, and path objects, returning a ClientResponse instance with the data returned from the endpoint.
        Parameters:
        stream - the StreamingOutput instance that contains the POST data
        mediaType - the content-type of the POST data
        pathArgs - variable list of arguments used to build the URI
        Returns:
        a ClientResponse instance with the data returned from the endpoint
        Throws:
        IOException - if an error occurs while constructing the URL
      • upload

        protected javax.ws.rs.core.Response upload​(String name,
                                                   File fileToUpload,
                                                   String mediaTypeString,
                                                   Object... pathArgs)
                                            throws IOException
        Perform a file upload using the specified media type, returning a ClientResponse instance with the data returned from the endpoint.
        Parameters:
        name - the name for the form field that contains the file name
        fileToUpload - a File instance pointing to the file to upload
        mediaTypeString - the content-type of the uploaded file, if null will be determined from fileToUpload
        pathArgs - variable list of arguments used to build the URI
        Returns:
        a ClientResponse instance with the data returned from the endpoint
        Throws:
        IOException - if an error occurs while constructing the URL
      • upload

        protected javax.ws.rs.core.Response upload​(String name,
                                                   File fileToUpload,
                                                   String mediaTypeString,
                                                   javax.ws.rs.core.Form formData,
                                                   Object... pathArgs)
                                            throws IOException
        Perform a file upload using the specified media type, returning a ClientResponse instance with the data returned from the endpoint.
        Parameters:
        name - the name for the form field that contains the file name
        fileToUpload - a File instance pointing to the file to upload
        mediaTypeString - the content-type of the uploaded file, if null will be determined from fileToUpload
        formData - the Form containing the name/value pairs
        pathArgs - variable list of arguments used to build the URI
        Returns:
        a ClientResponse instance with the data returned from the endpoint
        Throws:
        IOException - if an error occurs while constructing the URL
      • upload

        protected javax.ws.rs.core.Response upload​(String name,
                                                   File fileToUpload,
                                                   String mediaTypeString,
                                                   javax.ws.rs.core.Form formData,
                                                   URL url)
                                            throws IOException
        Perform a file upload using multipart/form-data, returning a ClientResponse instance with the data returned from the endpoint.
        Parameters:
        name - the name for the form field that contains the file name
        fileToUpload - a File instance pointing to the file to upload
        mediaTypeString - the content-type of the uploaded file, if null will be determined from fileToUpload
        formData - the Form containing the name/value pairs
        url - the fully formed path to the GitLab API endpoint
        Returns:
        a ClientResponse instance with the data returned from the endpoint
        Throws:
        IOException - if an error occurs while constructing the URL
      • putUpload

        protected javax.ws.rs.core.Response putUpload​(String name,
                                                      File fileToUpload,
                                                      Object... pathArgs)
                                               throws IOException
        Perform a file upload using multipart/form-data using the HTTP PUT method, returning a ClientResponse instance with the data returned from the endpoint.
        Parameters:
        name - the name for the form field that contains the file name
        fileToUpload - a File instance pointing to the file to upload
        pathArgs - variable list of arguments used to build the URI
        Returns:
        a ClientResponse instance with the data returned from the endpoint
        Throws:
        IOException - if an error occurs while constructing the URL
      • putUpload

        protected javax.ws.rs.core.Response putUpload​(String name,
                                                      File fileToUpload,
                                                      URL url)
                                               throws IOException
        Perform a file upload using multipart/form-data using the HTTP PUT method, returning a ClientResponse instance with the data returned from the endpoint.
        Parameters:
        name - the name for the form field that contains the file name
        fileToUpload - a File instance pointing to the file to upload
        url - the fully formed path to the GitLab API endpoint
        Returns:
        a ClientResponse instance with the data returned from the endpoint
        Throws:
        IOException - if an error occurs while constructing the URL
      • put

        protected javax.ws.rs.core.Response put​(javax.ws.rs.core.MultivaluedMap<String,​String> queryParams,
                                                Object... pathArgs)
                                         throws IOException
        Perform an HTTP PUT call with the specified form data and path objects, returning a ClientResponse instance with the data returned from the endpoint.
        Parameters:
        queryParams - multivalue map of request parameters
        pathArgs - variable list of arguments used to build the URI
        Returns:
        a ClientResponse instance with the data returned from the endpoint
        Throws:
        IOException - if an error occurs while constructing the URL
      • put

        protected javax.ws.rs.core.Response put​(javax.ws.rs.core.MultivaluedMap<String,​String> queryParams,
                                                URL url)
        Perform an HTTP PUT call with the specified form data and URL, returning a ClientResponse instance with the data returned from the endpoint.
        Parameters:
        queryParams - multivalue map of request parameters
        url - the fully formed path to the GitLab API endpoint
        Returns:
        a ClientResponse instance with the data returned from the endpoint
      • put

        protected javax.ws.rs.core.Response put​(javax.ws.rs.core.Form formData,
                                                Object... pathArgs)
                                         throws IOException
        Perform an HTTP PUT call with the specified form data and path objects, returning a ClientResponse instance with the data returned from the endpoint.
        Parameters:
        formData - the Form containing the name/value pairs
        pathArgs - variable list of arguments used to build the URI
        Returns:
        a ClientResponse instance with the data returned from the endpoint
        Throws:
        IOException - if an error occurs while constructing the URL
      • put

        protected javax.ws.rs.core.Response put​(javax.ws.rs.core.Form formData,
                                                URL url)
        Perform an HTTP PUT call with the specified form data and URL, returning a ClientResponse instance with the data returned from the endpoint.
        Parameters:
        formData - the Form containing the name/value pairs
        url - the fully formed path to the GitLab API endpoint
        Returns:
        a ClientResponse instance with the data returned from the endpoint
      • delete

        protected javax.ws.rs.core.Response delete​(javax.ws.rs.core.MultivaluedMap<String,​String> queryParams,
                                                   Object... pathArgs)
                                            throws IOException
        Perform an HTTP DELETE call with the specified form data and path objects, returning a Response instance with the data returned from the endpoint.
        Parameters:
        queryParams - multivalue map of request parameters
        pathArgs - variable list of arguments used to build the URI
        Returns:
        a Response instance with the data returned from the endpoint
        Throws:
        IOException - if an error occurs while constructing the URL
      • delete

        protected javax.ws.rs.core.Response delete​(javax.ws.rs.core.MultivaluedMap<String,​String> queryParams,
                                                   URL url)
        Perform an HTTP DELETE call with the specified form data and URL, returning a Response instance with the data returned from the endpoint.
        Parameters:
        queryParams - multivalue map of request parameters
        url - the fully formed path to the GitLab API endpoint
        Returns:
        a Response instance with the data returned from the endpoint
      • invocation

        protected javax.ws.rs.client.Invocation.Builder invocation​(URL url,
                                                                   javax.ws.rs.core.MultivaluedMap<String,​String> queryParams)
      • createApiClient

        protected javax.ws.rs.client.Client createApiClient()
      • invocation

        protected javax.ws.rs.client.Invocation.Builder invocation​(URL url,
                                                                   javax.ws.rs.core.MultivaluedMap<String,​String> queryParams,
                                                                   String accept)
      • getIgnoreCertificateErrors

        public boolean getIgnoreCertificateErrors()
        Returns true if the API is setup to ignore SSL certificate errors, otherwise returns false.
        Returns:
        true if the API is setup to ignore SSL certificate errors, otherwise returns false
      • setIgnoreCertificateErrors

        public void setIgnoreCertificateErrors​(boolean ignoreCertificateErrors)
        Sets up the Jersey system ignore SSL certificate errors or not.
        Parameters:
        ignoreCertificateErrors - if true will set up the Jersey system ignore SSL certificate errors