public interface CalloutBuilder extends MessageBuilder
Modifier and Type | Method and Description |
---|---|
default CalloutCallbackHandler |
getCallbackHandler()
Gets the callback handler associated with this builder.
|
String |
getPathInfo()
Retrieve the path info - the resource part of the url.
|
String |
getQueryParameter(String key)
Gets the query parameter corresponding to the key.
|
Map<String,String> |
getQueryParameters()
Deprecated.
Use getQueryParametersMultiValue instead
|
default Map<String,String[]> |
getQueryParametersMultiValue()
Returns the query parameters as multi-value array.
|
String |
getQueryString()
Gets the query string.
|
String |
getRequestMethod()
Gets the request Method.
|
String |
getRequestUrl()
Gets the request URL.
|
void |
ignoreAllRequestQueryParameters(boolean ignore)
Removes all query parameters from the original client request message.
|
default CalloutBuilder |
withCallback(CalloutCallbackHandler callbackHandler)
Adds callback handler.
|
void |
withoutQueryParameter(String key)
Sends the request message without a query parameter that you specify.
|
CalloutBuilder |
withPathInfo(String pathInfo)
PathInfo.
|
CalloutBuilder |
withQueryParameter(String key,
String value)
Adds or overwrites an individual query parameter.
|
default CalloutBuilder |
withQueryParameterMultiValue(String key,
String[] values)
Adds or overwrites an individual query parameter with ability to provide multi-value array.
|
CalloutBuilder |
withQueryString(String queryString)
Changes queryString parameters.
|
CalloutBuilder |
withRequestMethod(String method)
Changes the request method.
|
CalloutBuilder |
withRequestUrl(String url)
Changes the request URL.
|
addHeader, getBodyAsObject, getBodyAsStream, getBodyAsType, getCombinedHeaders, getHeader, ignoreAllRequestHeaders, withBodyAsObject, withBodyAsStream, withHeader, withHeaders, withoutHeader
default CalloutBuilder withCallback(CalloutCallbackHandler callbackHandler)
callbackHandler
- The callback for this builderdefault CalloutCallbackHandler getCallbackHandler()
CalloutBuilder withRequestUrl(String url)
url
- The URLCalloutBuilder withPathInfo(String pathInfo)
pathInfo
- pathInfoString getPathInfo()
String getRequestUrl()
CalloutBuilder withQueryString(String queryString)
queryString
- The string containing the query parametersCalloutBuilder withQueryParameter(String key, String value)
key
- The key of the query parametervalue
- The value of the query parameterdefault CalloutBuilder withQueryParameterMultiValue(String key, String[] values)
key
- The key of the query parametervalues
- The multi-value array of the query parameterString getQueryString()
String getQueryParameter(String key)
key
- The the key to find the parameter value undervoid withoutQueryParameter(String key)
key
- the query parameter to removevoid ignoreAllRequestQueryParameters(boolean ignore)
ignore
- true to remove all request query parameters, false (the default) merges the parameters with others.@Deprecated Map<String,String> getQueryParameters()
default Map<String,String[]> getQueryParametersMultiValue()
CalloutBuilder withRequestMethod(String method)
method
- The methodString getRequestMethod()