public class GitlabHTTPRequestor
extends java.lang.Object
Constructor and Description |
---|
GitlabHTTPRequestor(GitlabAPI root) |
Modifier and Type | Method and Description |
---|---|
<T> java.util.Iterator<T> |
asIterator(java.lang.String tailApiUrl,
java.lang.Class<T> type) |
GitlabHTTPRequestor |
authenticate(java.lang.String token,
TokenType type,
AuthMethod method)
Sets authentication data for the request.
|
<T> java.util.List<T> |
getAll(java.lang.String tailUrl,
java.lang.Class<T[]> type) |
GitlabHTTPRequestor |
method(java.lang.String method)
Sets the HTTP Request method for the request.
|
<T> T |
to(java.lang.String tailAPIUrl,
java.lang.Class<T> type) |
<T> T |
to(java.lang.String tailAPIUrl,
java.lang.Class<T> type,
T instance)
Opens the HTTP(S) connection, submits any data and parses the response.
|
<T> T |
to(java.lang.String tailAPIUrl,
T instance) |
GitlabHTTPRequestor |
with(java.lang.String key,
java.lang.Object value)
Sets the HTTP Form Post parameters for the request
Has a fluent api for method chaining
|
GitlabHTTPRequestor |
withAttachment(java.lang.String key,
java.io.File file)
Sets the HTTP Form Post parameters for the request
Has a fluent api for method chaining
|
public GitlabHTTPRequestor(GitlabAPI root)
public GitlabHTTPRequestor authenticate(java.lang.String token, TokenType type, AuthMethod method)
token
- The token valuetype
- The type of the tokenmethod
- The authentication methodpublic GitlabHTTPRequestor method(java.lang.String method)
method
- The HTTP methodpublic GitlabHTTPRequestor with(java.lang.String key, java.lang.Object value)
key
- Form parameter Keyvalue
- Form parameter Valuepublic GitlabHTTPRequestor withAttachment(java.lang.String key, java.io.File file)
key
- Form parameter Keyvalue
- Form parameter Valuepublic <T> T to(java.lang.String tailAPIUrl, T instance) throws java.io.IOException
java.io.IOException
public <T> T to(java.lang.String tailAPIUrl, java.lang.Class<T> type) throws java.io.IOException
java.io.IOException
public <T> T to(java.lang.String tailAPIUrl, java.lang.Class<T> type, T instance) throws java.io.IOException
T
- The return type of the methodtailAPIUrl
- The url to open a connection to (after the host and namespace)type
- The type of the response to be deserialized frominstance
- The instance to update from the responsejava.io.IOException
- on gitlab api errorpublic <T> java.util.List<T> getAll(java.lang.String tailUrl, java.lang.Class<T[]> type)
public <T> java.util.Iterator<T> asIterator(java.lang.String tailApiUrl, java.lang.Class<T> type)
Copyright © 2017. All Rights Reserved.