Modifiers | Name | Description |
---|---|---|
static class |
OkHttpSource.OkHttpBuilder |
A wrapper class around OKHttp's Request.Builder for building the request being sent in an Http call. |
Modifiers | Name | Description |
---|---|---|
static int |
MAX_RETRIES |
|
static org.slf4j.Logger |
logger |
Type | Name and description |
---|---|
okhttp3.OkHttpClient |
client |
groovy.lang.Closure |
configure |
boolean |
rejectOnNon200 |
okhttp3.HttpUrl |
url |
Constructor and description |
---|
OkHttpSource
(java.lang.String url, okhttp3.OkHttpClient client, groovy.lang.Closure configure) The constructor of OkHttpSource used internally. |
Type Params | Return Type | Name and description |
---|---|---|
|
void |
doStart(Pipeline pipeline) |
|
static OkHttpSource |
http(java.lang.String url, groovy.lang.Closure configure = null ) This creates an OkHttpSource with its own OkHttpClient which won't be shared. |
|
static OkHttpSource |
http(java.lang.String url, okhttp3.OkHttpClient client, groovy.lang.Closure configure = null ) Best practice is to share OkHttpClients when performing multiple http calls or multiple OkHttpSources. |
|
static OkHttpSource |
https(java.lang.String url, groovy.lang.Closure configure = null ) This creates an OkHttpSource with its own OkHttpClient which won't be shared. |
|
static OkHttpSource |
https(java.lang.String url, okhttp3.OkHttpClient client, groovy.lang.Closure configure = null) Best practice is to share OkHttpClients when performing multiple http calls or multiple OkHttpSources. |
|
OkHttpSource |
rejectNon200(boolean reject) |
The constructor of OkHttpSource used internally. Use one of the static helper methods when constructing an instance of this type.
This creates an OkHttpSource with its own OkHttpClient which won't be shared. This is only useful when using only 1 OkHttpSource. If you have multiple OkHttpSources within your pipeline or you execute multiple calls consider shared the OkHttpClient instance between them using: OkHttpSource.http
url
- the url to loadconfigure
- a closure to configure the request or other aspects of this call.Best practice is to share OkHttpClients when performing multiple http calls or multiple OkHttpSources. This enables sharing the OkHttpClient across multiple OkHttpSource instances.
url
- the url to loadclient
- the shared OkHttpClient instanceconfigure
- a closure to configure the request or other aspects of this call.This creates an OkHttpSource with its own OkHttpClient which won't be shared. This is only useful when using only 1 OkHttpSource. If you have multiple OkHttpSources within your pipeline or you execute multiple calls consider shared the OkHttpClient instance between them using: OkHttpSource.https
url
- the url to loadconfigure
- a closure to configure the request or other aspects of this call.Best practice is to share OkHttpClients when performing multiple http calls or multiple OkHttpSources. This enables sharing the OkHttpClient across multiple OkHttpSource instances.
url
- the url to loadclient
- the shared OkHttpClient instanceconfigure
- a closure to configure the request or other aspects of this call.Groovy Documentation