public class GitLabApiClient
extends java.lang.Object
implements java.lang.AutoCloseable
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
AUTHORIZATION_HEADER |
protected static java.lang.String |
PRIVATE_TOKEN_HEADER |
protected static java.lang.String |
SUDO_HEADER |
protected static java.lang.String |
X_GITLAB_TOKEN_HEADER |
Constructor and Description |
---|
GitLabApiClient(GitLabApi.ApiVersion apiVersion,
java.lang.String hostUrl,
Constants.TokenType tokenType,
java.lang.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.
|
GitLabApiClient(GitLabApi.ApiVersion apiVersion,
java.lang.String hostUrl,
Constants.TokenType tokenType,
java.lang.String authToken,
java.lang.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.
|
GitLabApiClient(GitLabApi.ApiVersion apiVersion,
java.lang.String hostUrl,
Constants.TokenType tokenType,
java.lang.String authToken,
java.lang.String secretToken,
java.util.Map<java.lang.String,java.lang.Object> clientConfigProperties)
Construct an instance to communicate with a GitLab API server using the specified GitLab API version,
server URL and private token.
|
GitLabApiClient(GitLabApi.ApiVersion apiVersion,
java.lang.String hostUrl,
java.lang.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.
|
GitLabApiClient(GitLabApi.ApiVersion apiVersion,
java.lang.String hostUrl,
java.lang.String privateToken,
java.lang.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.
|
GitLabApiClient(GitLabApi.ApiVersion apiVersion,
java.lang.String hostUrl,
java.lang.String privateToken,
java.lang.String secretToken,
java.util.Map<java.lang.String,java.lang.Object> clientConfigProperties)
Construct an instance to communicate with a GitLab API server using the specified GitLab API version,
server URL and private token.
|
GitLabApiClient(java.lang.String hostUrl,
Constants.TokenType tokenType,
java.lang.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.
|
GitLabApiClient(java.lang.String hostUrl,
Constants.TokenType tokenType,
java.lang.String authToken,
java.lang.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.
|
GitLabApiClient(java.lang.String hostUrl,
java.lang.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.
|
GitLabApiClient(java.lang.String hostUrl,
java.lang.String privateToken,
java.lang.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.
|
GitLabApiClient(java.lang.String hostUrl,
java.lang.String privateToken,
java.lang.String secretToken,
java.util.Map<java.lang.String,java.lang.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.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the underlying
Client and its associated resources. |
protected javax.ws.rs.client.Client |
createApiClient() |
protected javax.ws.rs.core.Response |
delete(javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> queryParams,
java.lang.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<java.lang.String,java.lang.String> queryParams,
java.net.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<java.lang.String,java.lang.String> queryParams,
java.lang.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<java.lang.String,java.lang.String> queryParams,
java.net.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 java.net.URL |
getApiUrl(java.lang.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 java.net.URL |
getUrlWithBase(java.lang.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<java.lang.String,java.lang.String> queryParams,
java.lang.String accepts,
java.lang.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<java.lang.String,java.lang.String> queryParams,
java.net.URL url,
java.lang.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<java.lang.String,java.lang.String> queryParams,
java.lang.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<java.lang.String,java.lang.String> queryParams,
java.net.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(java.net.URL url,
javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> queryParams) |
protected javax.ws.rs.client.Invocation.Builder |
invocation(java.net.URL url,
javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> queryParams,
java.lang.String accept) |
protected javax.ws.rs.core.Response |
patch(javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> queryParams,
java.lang.Object... pathArgs)
Perform an HTTP PATCH 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 |
patch(javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> queryParams,
java.net.URL url)
Perform an HTTP PATCH 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 |
post(javax.ws.rs.core.Form formData,
java.lang.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,
java.net.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<java.lang.String,java.lang.String> queryParams,
java.lang.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<java.lang.String,java.lang.String> queryParams,
java.net.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(java.lang.Object payload,
java.lang.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.StreamingOutput stream,
java.lang.String mediaType,
java.lang.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,
java.lang.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,
java.net.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<java.lang.String,java.lang.String> queryParams,
java.lang.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<java.lang.String,java.lang.String> queryParams,
java.net.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(java.lang.Object payload,
java.lang.Object... pathArgs)
Perform an HTTP PUT 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 |
putUpload(java.lang.String name,
java.io.File fileToUpload,
java.lang.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(java.lang.String name,
java.io.File fileToUpload,
java.net.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 |
setAuthTokenSupplier(java.util.function.Supplier<java.lang.String> authTokenSupplier)
Set auth token supplier for gitlab api client.
|
void |
setIgnoreCertificateErrors(boolean ignoreCertificateErrors)
Sets up the Jersey system ignore SSL certificate errors or not.
|
protected javax.ws.rs.core.Response |
upload(org.glassfish.jersey.media.multipart.BodyPart bodyPart,
javax.ws.rs.core.Form formData,
java.net.URL url) |
protected javax.ws.rs.core.Response |
upload(java.lang.String name,
java.io.File fileToUpload,
java.lang.String mediaTypeString,
javax.ws.rs.core.Form formData,
java.lang.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(java.lang.String name,
java.io.File fileToUpload,
java.lang.String mediaTypeString,
javax.ws.rs.core.Form formData,
java.net.URL url)
Perform a file upload using multipart/form-data, returning
a ClientResponse instance with the data returned from the endpoint.
|
protected javax.ws.rs.core.Response |
upload(java.lang.String name,
java.io.File fileToUpload,
java.lang.String mediaTypeString,
java.lang.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(java.lang.String name,
java.io.InputStream inputStream,
java.lang.String filename,
java.lang.String mediaTypeString,
javax.ws.rs.core.Form formData,
java.net.URL url) |
protected javax.ws.rs.core.Response |
upload(java.lang.String name,
java.io.InputStream inputStream,
java.lang.String filename,
java.lang.String mediaTypeString,
java.lang.Object... pathArgs) |
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.
|
protected static final java.lang.String PRIVATE_TOKEN_HEADER
protected static final java.lang.String SUDO_HEADER
protected static final java.lang.String AUTHORIZATION_HEADER
protected static final java.lang.String X_GITLAB_TOKEN_HEADER
public GitLabApiClient(GitLabApi.ApiVersion apiVersion, java.lang.String hostUrl, java.lang.String privateToken)
apiVersion
- the ApiVersion specifying which version of the API to usehostUrl
- the URL to the GitLab API serverprivateToken
- the private token to authenticate withpublic GitLabApiClient(GitLabApi.ApiVersion apiVersion, java.lang.String hostUrl, Constants.TokenType tokenType, java.lang.String authToken)
apiVersion
- the ApiVersion specifying which version of the API to usehostUrl
- the URL to the GitLab API servertokenType
- the type of auth the token is for, PRIVATE or ACCESSauthToken
- the token to authenticate withpublic GitLabApiClient(java.lang.String hostUrl, java.lang.String privateToken)
hostUrl
- the URL to the GitLab API serverprivateToken
- the private token to authenticate withpublic GitLabApiClient(java.lang.String hostUrl, Constants.TokenType tokenType, java.lang.String authToken)
hostUrl
- the URL to the GitLab API servertokenType
- the type of auth the token is for, PRIVATE or ACCESSauthToken
- the token to authenticate withpublic GitLabApiClient(GitLabApi.ApiVersion apiVersion, java.lang.String hostUrl, java.lang.String privateToken, java.lang.String secretToken)
apiVersion
- the ApiVersion specifying which version of the API to usehostUrl
- the URL to the GitLab API serverprivateToken
- the private token to authenticate withsecretToken
- use this token to validate received payloadspublic GitLabApiClient(GitLabApi.ApiVersion apiVersion, java.lang.String hostUrl, Constants.TokenType tokenType, java.lang.String authToken, java.lang.String secretToken)
apiVersion
- the ApiVersion specifying which version of the API to usehostUrl
- the URL to the GitLab API servertokenType
- the type of auth the token is for, PRIVATE or ACCESSauthToken
- the token to authenticate withsecretToken
- use this token to validate received payloadspublic GitLabApiClient(java.lang.String hostUrl, java.lang.String privateToken, java.lang.String secretToken)
hostUrl
- the URL to the GitLab API serverprivateToken
- the private token to authenticate withsecretToken
- use this token to validate received payloadspublic GitLabApiClient(java.lang.String hostUrl, Constants.TokenType tokenType, java.lang.String authToken, java.lang.String secretToken)
hostUrl
- the URL to the GitLab API servertokenType
- the type of auth the token is for, PRIVATE or ACCESSauthToken
- the token to authenticate withsecretToken
- use this token to validate received payloadspublic GitLabApiClient(java.lang.String hostUrl, java.lang.String privateToken, java.lang.String secretToken, java.util.Map<java.lang.String,java.lang.Object> clientConfigProperties)
hostUrl
- the URL to the GitLab API serverprivateToken
- the private token to authenticate withsecretToken
- use this token to validate received payloadsclientConfigProperties
- the properties given to Jersey's clientconfigpublic GitLabApiClient(GitLabApi.ApiVersion apiVersion, java.lang.String hostUrl, java.lang.String privateToken, java.lang.String secretToken, java.util.Map<java.lang.String,java.lang.Object> clientConfigProperties)
apiVersion
- the ApiVersion specifying which version of the API to usehostUrl
- the URL to the GitLab API serverprivateToken
- the private token to authenticate withsecretToken
- use this token to validate received payloadsclientConfigProperties
- the properties given to Jersey's clientconfigpublic GitLabApiClient(GitLabApi.ApiVersion apiVersion, java.lang.String hostUrl, Constants.TokenType tokenType, java.lang.String authToken, java.lang.String secretToken, java.util.Map<java.lang.String,java.lang.Object> clientConfigProperties)
apiVersion
- the ApiVersion specifying which version of the API to usehostUrl
- the URL to the GitLab API servertokenType
- the type of auth the token is for, PRIVATE or ACCESSauthToken
- the private token to authenticate withsecretToken
- use this token to validate received payloadsclientConfigProperties
- the properties given to Jersey's clientconfigpublic void close()
Client
and its associated resources.close
in interface java.lang.AutoCloseable
protected java.net.URL getApiUrl(java.lang.Object... pathArgs) throws java.io.IOException
pathArgs
- variable list of arguments used to build the URIjava.io.IOException
- if an error occurs while constructing the URLprotected java.net.URL getUrlWithBase(java.lang.Object... pathArgs) throws java.io.IOException
pathArgs
- variable list of arguments used to build the URIjava.io.IOException
- if an error occurs while constructing the URLprotected boolean validateSecretToken(javax.ws.rs.core.Response response)
response
- the Response instance sent from the GitLab serverprotected javax.ws.rs.core.Response get(javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> queryParams, java.lang.Object... pathArgs) throws java.io.IOException
queryParams
- multivalue map of request parameterspathArgs
- variable list of arguments used to build the URIjava.io.IOException
- if an error occurs while constructing the URLprotected javax.ws.rs.core.Response get(javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> queryParams, java.net.URL url)
queryParams
- multivalue map of request parametersurl
- the fully formed path to the GitLab API endpointprotected javax.ws.rs.core.Response getWithAccepts(javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> queryParams, java.lang.String accepts, java.lang.Object... pathArgs) throws java.io.IOException
queryParams
- multivalue map of request parametersaccepts
- if non-empty will set the Accepts header to this valuepathArgs
- variable list of arguments used to build the URIjava.io.IOException
- if an error occurs while constructing the URLprotected javax.ws.rs.core.Response getWithAccepts(javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> queryParams, java.net.URL url, java.lang.String accepts)
queryParams
- multivalue map of request parametersurl
- the fully formed path to the GitLab API endpointaccepts
- if non-empty will set the Accepts header to this valueprotected javax.ws.rs.core.Response head(javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> queryParams, java.lang.Object... pathArgs) throws java.io.IOException
queryParams
- multivalue map of request parameterspathArgs
- variable list of arguments used to build the URIjava.io.IOException
- if an error occurs while constructing the URLprotected javax.ws.rs.core.Response head(javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> queryParams, java.net.URL url)
queryParams
- multivalue map of request parametersurl
- the fully formed path to the GitLab API endpointprotected javax.ws.rs.core.Response patch(javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> queryParams, java.lang.Object... pathArgs) throws java.io.IOException
queryParams
- multivalue map of request parameterspathArgs
- variable list of arguments used to build the URIjava.io.IOException
- if an error occurs while constructing the URLprotected javax.ws.rs.core.Response patch(javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> queryParams, java.net.URL url)
queryParams
- multivalue map of request parametersurl
- the fully formed path to the GitLab API endpointprotected javax.ws.rs.core.Response post(javax.ws.rs.core.Form formData, java.lang.Object... pathArgs) throws java.io.IOException
formData
- the Form containing the name/value pairspathArgs
- variable list of arguments used to build the URIjava.io.IOException
- if an error occurs while constructing the URLprotected javax.ws.rs.core.Response post(javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> queryParams, java.lang.Object... pathArgs) throws java.io.IOException
queryParams
- multivalue map of request parameterspathArgs
- variable list of arguments used to build the URIjava.io.IOException
- if an error occurs while constructing the URLprotected javax.ws.rs.core.Response post(javax.ws.rs.core.Form formData, java.net.URL url)
formData
- the Form containing the name/value pairsurl
- the fully formed path to the GitLab API endpointprotected javax.ws.rs.core.Response post(javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> queryParams, java.net.URL url)
queryParams
- multivalue map of request parametersformData the Form containing the name/value pairsurl
- the fully formed path to the GitLab API endpointprotected javax.ws.rs.core.Response post(java.lang.Object payload, java.lang.Object... pathArgs) throws java.io.IOException
payload
- the object instance that will be serialized to JSON and used as the POST datapathArgs
- variable list of arguments used to build the URIjava.io.IOException
- if an error occurs while constructing the URLprotected javax.ws.rs.core.Response post(javax.ws.rs.core.StreamingOutput stream, java.lang.String mediaType, java.lang.Object... pathArgs) throws java.io.IOException
stream
- the StreamingOutput instance that contains the POST datamediaType
- the content-type of the POST datapathArgs
- variable list of arguments used to build the URIjava.io.IOException
- if an error occurs while constructing the URLprotected javax.ws.rs.core.Response upload(java.lang.String name, java.io.File fileToUpload, java.lang.String mediaTypeString, java.lang.Object... pathArgs) throws java.io.IOException
name
- the name for the form field that contains the file namefileToUpload
- a File instance pointing to the file to uploadmediaTypeString
- unused; will be removed in the next major versionpathArgs
- variable list of arguments used to build the URIjava.io.IOException
- if an error occurs while constructing the URLprotected javax.ws.rs.core.Response upload(java.lang.String name, java.io.File fileToUpload, java.lang.String mediaTypeString, javax.ws.rs.core.Form formData, java.lang.Object... pathArgs) throws java.io.IOException
name
- the name for the form field that contains the file namefileToUpload
- a File instance pointing to the file to uploadmediaTypeString
- unused; will be removed in the next major versionformData
- the Form containing the name/value pairspathArgs
- variable list of arguments used to build the URIjava.io.IOException
- if an error occurs while constructing the URLprotected javax.ws.rs.core.Response upload(java.lang.String name, java.io.File fileToUpload, java.lang.String mediaTypeString, javax.ws.rs.core.Form formData, java.net.URL url) throws java.io.IOException
name
- the name for the form field that contains the file namefileToUpload
- a File instance pointing to the file to uploadmediaTypeString
- unused; will be removed in the next major versionformData
- the Form containing the name/value pairsurl
- the fully formed path to the GitLab API endpointjava.io.IOException
- if an error occurs while constructing the URLprotected javax.ws.rs.core.Response upload(java.lang.String name, java.io.InputStream inputStream, java.lang.String filename, java.lang.String mediaTypeString, java.lang.Object... pathArgs) throws java.io.IOException
java.io.IOException
protected javax.ws.rs.core.Response upload(java.lang.String name, java.io.InputStream inputStream, java.lang.String filename, java.lang.String mediaTypeString, javax.ws.rs.core.Form formData, java.net.URL url) throws java.io.IOException
java.io.IOException
protected javax.ws.rs.core.Response upload(org.glassfish.jersey.media.multipart.BodyPart bodyPart, javax.ws.rs.core.Form formData, java.net.URL url) throws java.io.IOException
java.io.IOException
protected javax.ws.rs.core.Response putUpload(java.lang.String name, java.io.File fileToUpload, java.lang.Object... pathArgs) throws java.io.IOException
name
- the name for the form field that contains the file namefileToUpload
- a File instance pointing to the file to uploadpathArgs
- variable list of arguments used to build the URIjava.io.IOException
- if an error occurs while constructing the URLprotected javax.ws.rs.core.Response putUpload(java.lang.String name, java.io.File fileToUpload, java.net.URL url) throws java.io.IOException
name
- the name for the form field that contains the file namefileToUpload
- a File instance pointing to the file to uploadurl
- the fully formed path to the GitLab API endpointjava.io.IOException
- if an error occurs while constructing the URLprotected javax.ws.rs.core.Response put(javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> queryParams, java.lang.Object... pathArgs) throws java.io.IOException
queryParams
- multivalue map of request parameterspathArgs
- variable list of arguments used to build the URIjava.io.IOException
- if an error occurs while constructing the URLprotected javax.ws.rs.core.Response put(javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> queryParams, java.net.URL url)
queryParams
- multivalue map of request parametersurl
- the fully formed path to the GitLab API endpointprotected javax.ws.rs.core.Response put(javax.ws.rs.core.Form formData, java.lang.Object... pathArgs) throws java.io.IOException
formData
- the Form containing the name/value pairspathArgs
- variable list of arguments used to build the URIjava.io.IOException
- if an error occurs while constructing the URLprotected javax.ws.rs.core.Response put(javax.ws.rs.core.Form formData, java.net.URL url)
formData
- the Form containing the name/value pairsurl
- the fully formed path to the GitLab API endpointprotected javax.ws.rs.core.Response put(java.lang.Object payload, java.lang.Object... pathArgs) throws java.io.IOException
payload
- the object instance that will be serialized to JSON and used as the PUT datapathArgs
- variable list of arguments used to build the URIjava.io.IOException
- if an error occurs while constructing the URLprotected javax.ws.rs.core.Response delete(javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> queryParams, java.lang.Object... pathArgs) throws java.io.IOException
queryParams
- multivalue map of request parameterspathArgs
- variable list of arguments used to build the URIjava.io.IOException
- if an error occurs while constructing the URLprotected javax.ws.rs.core.Response delete(javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> queryParams, java.net.URL url)
queryParams
- multivalue map of request parametersurl
- the fully formed path to the GitLab API endpointprotected javax.ws.rs.client.Invocation.Builder invocation(java.net.URL url, javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> queryParams)
protected javax.ws.rs.client.Client createApiClient()
protected javax.ws.rs.client.Invocation.Builder invocation(java.net.URL url, javax.ws.rs.core.MultivaluedMap<java.lang.String,java.lang.String> queryParams, java.lang.String accept)
public boolean getIgnoreCertificateErrors()
public void setIgnoreCertificateErrors(boolean ignoreCertificateErrors)
ignoreCertificateErrors
- if true will set up the Jersey system ignore SSL certificate errorspublic void setAuthTokenSupplier(java.util.function.Supplier<java.lang.String> authTokenSupplier)
authTokenSupplier
- - supplier which provide actual auth token