Class ApiCall<Self>
java.lang.Object
de.xima.fc.api.rest.pub.client.generic.ApiCall<Self>
- Type Parameters:
Self- The sub type that extends this call.
- Direct Known Subclasses:
EndpointCategoryCall
@Generated("de.xima.openapi.codegen.java_jaxrs.XimaJavaJaxrsGenerator")
public abstract class ApiCall<Self>
extends Object
Represents a general API call to an endpoint. This instance is mutable and
not thread-safe and should be used only for a single API call. You can
modify the request before it's sent, but note that this is a low-level
operation and may result in unexpected errors.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected ApiCallInterceptorprotected List<Authentication> protected String[]protected RequestBodyprotected Stringprotected Stringprotected Map<Integer, ResponseTypeInfo> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaccept()apiCallInterceptor(ApiCallInterceptor apiCallInterceptor) authentication(Authentication authentication) Adds an authentication to the existing local authentications.authentications(List<Authentication> authentications) String[]body()body(RequestBody body) cookieParam(String name, String value) Add a cookie parameter to the existing parameters.cookieParams(Map<String, String> cookieParams) headerParam(String name, String value) Add a header parameter to the existing parameters.headerParams(Map<String, String> headerParams) method()path()Gets the properties in the context of a request.properties(Map<String, Object> properties) Sets the properties in the context of a request.Set a new property in the context of a request.queryParam(Pair queryNameValuePair) Add a query parameter to the existing parameters.queryParams(List<Pair> queryParams) returnTypes(Map<Integer, ResponseTypeInfo> returnTypes) protected abstract Selfself()
-
Field Details
-
queryParams
-
headerParams
-
cookieParams
-
body
-
path
-
authentications
-
accept
-
authNames
-
method
-
returnTypes
-
apiCallInterceptor
-
properties
-
-
Constructor Details
-
ApiCall
public ApiCall()
-
-
Method Details
-
queryParams
-
queryParams
-
queryParam
-
headerParams
-
headerParams
-
headerParam
-
cookieParams
-
cookieParams
-
cookieParam
-
body
- Returns:
- The body content to send with the request.
-
body
- Parameters:
body- The body content to send with the request.- Returns:
- This instance for chaining method calls.
-
body
-
path
- Returns:
- The sub path of the endpoint URL.
-
path
-
accept
- Returns:
- The request's Accept header
-
accept
-
method
- Returns:
- The request method, one of "GET", "POST", "PUT", "HEAD" and "DELETE"
-
method
-
authNames
- Returns:
- The authentications to apply.
-
authNames
-
apiCallInterceptor
- Returns:
- An optional interceptor to apply during the API call. Applied after the interceptor from the client.
-
apiCallInterceptor
- Parameters:
apiCallInterceptor- An optional interceptor to apply during the API call. Applied after the interceptor from the client.- Returns:
- This instance for chaining method calls.
-
returnTypes
- Returns:
- The return type into which to deserialize the response
-
returnTypes
- Parameters:
returnTypes- The return type into which to deserialize the response- Returns:
- This instance for chaining method calls.
-
authentications
- Returns:
- Additional authentications that should be applied.
-
authentications
- Parameters:
authentications- Additional authentications that should be applied.- Returns:
- This instance for chaining method calls.
-
authentication
Adds an authentication to the existing local authentications.- Parameters:
authentication- An additional authentication that should be applied.- Returns:
- This instance for chaining method calls.
-
properties
-
properties
Sets the properties in the context of a request. The properties are available for the lifetime of the request, applied to the JAX RS invocation.- Parameters:
properties- Properties to set. These will overwrite all existing properties.- Returns:
- This instance for chaining method calls.
-
property
Set a new property in the context of a request. The properties are available for the lifetime of the request, applied to the JAX RS invocation.- Parameters:
name- Name of the property.value- New value of the property.- Returns:
- This instance for chaining method calls.
-
self
-