Skip to content

Commit

Permalink
fix name
Browse files Browse the repository at this point in the history
  • Loading branch information
Siddhanttimeline committed Oct 1, 2024
1 parent aa2ec63 commit ba0c658
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ private void prepareAndSendMessage(String json, Invocation.Builder target) {
headers.forEach(target::header);
}

Webhook.HttpOperation httpOperation = webhook.getHttpOperation();
Webhook.HttpMethod httpOperation = webhook.getHttpMethod();
postWebhookMessage(this, target, json, httpOperation);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -417,18 +417,18 @@ public static Invocation.Builder appendHeadersToTarget(Client client, String uri

public static void postWebhookMessage(
Destination<ChangeEvent> destination, Invocation.Builder target, Object message) {
postWebhookMessage(destination, target, message, Webhook.HttpOperation.POST);
postWebhookMessage(destination, target, message, Webhook.HttpMethod.POST);
}

public static void postWebhookMessage(
Destination<ChangeEvent> destination,
Invocation.Builder target,
Object message,
Webhook.HttpOperation httpOperation) {
Webhook.HttpMethod httpMethod) {
long attemptTime = System.currentTimeMillis();
Response response;

if (httpOperation == Webhook.HttpOperation.PUT) {
if (httpMethod == Webhook.HttpMethod.PUT) {
response =
target.put(javax.ws.rs.client.Entity.entity(message, MediaType.APPLICATION_JSON_TYPE));
} else {
Expand All @@ -438,7 +438,7 @@ public static void postWebhookMessage(

LOG.debug(
"Subscription Destination HTTP Operation {}:{} received response {}",
httpOperation,
httpMethod,
destination.getSubscriptionDestination().getId(),
response.getStatusInfo());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"description": "Optional JSON payload to be sent with the webhook request.",
"type": "string"
},
"httpOperation": {
"httpMethod": {
"description": "HTTP operation to send the webhook request. Supports POST or PUT.",
"type": "string",
"enum": ["POST", "PUT"],
Expand Down

0 comments on commit ba0c658

Please sign in to comment.