Class ApiAuthenticatedRequest
- java.lang.Object
-
- com.inhousegreenhouse.ch.backend.model.api.ApiRequest
-
- com.inhousegreenhouse.ch.backend.model.api.ApiAuthenticatedRequest
-
public class ApiAuthenticatedRequest extends ApiRequest
This class represent an API request that is authenticated with an API token.
-
-
Constructor Summary
Constructors Constructor Description ApiAuthenticatedRequest(Api api, GraphQLQuery query, java.lang.String token, ApiHeader... additionalHeaders)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.net.http.HttpRequest
build()
Build the request to send to the API.-
Methods inherited from class com.inhousegreenhouse.ch.backend.model.api.ApiRequest
getApiConfig, getHeaders, getQuery
-
-
-
-
Constructor Detail
-
ApiAuthenticatedRequest
public ApiAuthenticatedRequest(Api api, GraphQLQuery query, java.lang.String token, ApiHeader... additionalHeaders)
Constructor.- Parameters:
api
- The API configuration object to use.query
- The GraphQL query that will sent to the APIs.token
- The API token to use for authentication.additionalHeaders
- The additional headers to use for the request.
-
-
Method Detail
-
build
public java.net.http.HttpRequest build()
Build the request to send to the API.- Overrides:
build
in classApiRequest
- Returns:
- The request to send to the API as an HttpRequest.
-
-