Skip to content

Add PATCH to HttpMethods enum for service invocation #1622

Description

@lindner

Problem

The HttpMethods enum in DaprHttp does not include PATCH, which prevents using DaprClient.invokeMethod() with PATCH requests through HTTPEndpoints.

Use Case

When calling external REST APIs via Dapr HTTPEndpoint and service invocation, PATCH is commonly required for partial updates. For example, Salesforce REST API requires PATCH for updating records.

Current Workaround

Developers must bypass the SDK and make direct HTTP calls to the Dapr sidecar:

var url = "http://localhost:" + daprPort + "/v1.0/invoke/" + appId + "/method/" + path;
var request = HttpRequest.newBuilder()
    .uri(URI.create(url))
    .method("PATCH", BodyPublishers.ofString(body))
    .build();
httpClient.send(request, BodyHandlers.ofString());

This loses the benefits of the SDK (type safety, error handling, reactive patterns).

Proposed Solution

Add PATCH to the HttpMethods enum in DaprHttp.java:

public enum HttpMethods {
  NONE,
  GET,
  PUT,
  POST,
  DELETE,
  HEAD,
  CONNECT,
  OPTIONS,
  TRACE,
  PATCH  // Add this
}

Environment

  • Java SDK version: 1.12.0
  • Dapr runtime: 1.14.x

Activity

  1. added 2 commits that reference this issue on Jan 21, 2026
    c703f67
    443b03d
  2. added 2 commits that reference this issue on Feb 2, 2026
    14ccc30
    c5e1af0
  3. added a commit that references this issue on Feb 2, 2026
    528451f
  4. added 4 commits that reference this issue on Feb 2, 2026
    757dca5
    5d87d44
    488c3b5
    3025cc7
  5. added a commit that references this issue on Feb 2, 2026
    2ecc509
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions