Package com.openai.services.async
Interface WebhookServiceAsync
-
- All Implemented Interfaces:
public interface WebhookServiceAsync
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interface
WebhookServiceAsync.WithRawResponse
A view of WebhookServiceAsync that provides access to raw HTTP responses for each method.
-
Method Summary
Modifier and Type Method Description abstract WebhookServiceAsync.WithRawResponse
withRawResponse()
Returns a view of this service that provides access to raw HTTP responses for each method. abstract WebhookServiceAsync
withOptions(Consumer<ClientOptions.Builder> modifier)
Returns a view of this service with the given option modifications applied. abstract UnwrapWebhookEvent
unwrap(WebhookVerificationParams params)
Validates that the given payload was sent by OpenAI and parses the payload. abstract Unit
verifySignature(WebhookVerificationParams params)
Validates whether or not the webhook payload was sent by OpenAI. -
-
Method Detail
-
withRawResponse
abstract WebhookServiceAsync.WithRawResponse withRawResponse()
Returns a view of this service that provides access to raw HTTP responses for each method.
-
withOptions
abstract WebhookServiceAsync withOptions(Consumer<ClientOptions.Builder> modifier)
Returns a view of this service with the given option modifications applied.
The original service is not modified.
-
unwrap
abstract UnwrapWebhookEvent unwrap(WebhookVerificationParams params)
Validates that the given payload was sent by OpenAI and parses the payload.
- Parameters:
params
- Verification parameters including payload, headers, secret and tolerance
-
verifySignature
abstract Unit verifySignature(WebhookVerificationParams params)
Validates whether or not the webhook payload was sent by OpenAI.
- Parameters:
params
- Verification parameters including payload, headers, secret and tolerance
-
-
-
-