Skip to content

feat: allow PATCH in http_request for non-replicated calls#289

Open
ggreif wants to merge 1 commit into
dfinity:mainfrom
ggreif:migrate-portal-6245
Open

feat: allow PATCH in http_request for non-replicated calls#289
ggreif wants to merge 1 commit into
dfinity:mainfrom
ggreif:migrate-portal-6245

Conversation

@ggreif

@ggreif ggreif commented Jun 9, 2026

Copy link
Copy Markdown

Migrated from dfinity/portal#6245 (moved to this repo per reviewer request — the spec is now hosted here).

What

  • public/references/ic.did: method variant → variant { get; head; post; put; delete; patch }.
  • docs/references/ic-interface-spec/management-canister.md: document PATCH alongside PUT/DELETE as supported in non-replicated mode only (two paragraphs).
  • docs/references/ic-interface-spec/changelog.md: new 0.63.0 (TBD) entry.

Note: the changelog uses 0.63.0 because 0.62.0 is already present in this repo with different content (2025-05-26). Please confirm the correct version number before merging.

Why

PATCH is the last common REST verb missing after PUT/DELETE landed (dfinity/portal#6199). It is pervasive in modern REST APIs for partial updates (Google Calendar, GitHub, Stripe, …). The concrete driver is generated Motoko clients for the Google Calendar API whose partial-update operations are otherwise un-callable.

Why non-replicated only

Same rationale as PUT/DELETE: in replicated mode an outcall is issued once per replica; PATCH is additionally not guaranteed idempotent (RFC 5789 §2). The existing is_replicated machinery already covers it; no new mechanism is introduced.

Notes

Mirrors dfinity/portal#6199 (PUT/DELETE). PATCH is a mutation, so like PUT/DELETE it is
restricted to non-replicated mode (a replicated outcall is sent once per
replica; PATCH is not guaranteed idempotent per RFC 5789). Requested in dfinity/portal#6244.

Migrated from dfinity/portal#6245.

NOTE: The changelog entry uses 0.63.0 because developer-docs already has a
0.62.0 entry with different content. The correct version number needs
human confirmation before this PR is merged.

Co-Authored-By: Claude <noreply@anthropic.com>
Comment thread docs/references/ic-interface-spec/changelog.md
@ggreif ggreif marked this pull request as ready for review June 9, 2026 12:34
@ggreif ggreif requested review from a team as code owners June 9, 2026 12:34
@ggreif ggreif requested a review from mraszyk June 9, 2026 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external-contributor interface-spec Changes to the IC interface specification

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants