Package com.openai.services.blocking
Class WebhookServiceImpl
-
- All Implemented Interfaces:
-
com.openai.services.blocking.WebhookService
public final class WebhookServiceImpl implements WebhookService
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final class
WebhookServiceImpl.WithRawResponseImpl
-
Method Summary
Modifier and Type Method Description WebhookService.WithRawResponse
withRawResponse()
Returns a view of this service that provides access to raw HTTP responses for each method. WebhookService
withOptions(Consumer<ClientOptions.Builder> modifier)
Returns a view of this service with the given option modifications applied. UnwrapWebhookEvent
unwrap(WebhookVerificationParams params)
Validates that the given payload was sent by OpenAI and parses the payload. Unit
verifySignature(WebhookVerificationParams params)
Validates whether or not the webhook payload was sent by OpenAI. -
-
Method Detail
-
withRawResponse
WebhookService.WithRawResponse withRawResponse()
Returns a view of this service that provides access to raw HTTP responses for each method.
-
withOptions
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
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- Returns:
The parsed webhook event
-
verifySignature
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
-
-
-
-