Package com.openai.services.blocking
Interface WebhookService
-
- All Implemented Interfaces:
public interface WebhookService
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interface
WebhookService.WithRawResponse
A view of WebhookService that provides access to raw HTTP responses for each method.
-
Method Summary
Modifier and Type Method Description abstract WebhookService.WithRawResponse
withRawResponse()
Returns a view of this service that provides access to raw HTTP responses for each method. abstract WebhookService
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 WebhookService.WithRawResponse withRawResponse()
Returns a view of this service that provides access to raw HTTP responses for each method.
-
withOptions
abstract WebhookService 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
-
-
-
-