feat: allow PATCH in http_request for non-replicated calls#289
Open
ggreif wants to merge 1 commit into
Open
Conversation
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>
ggreif
commented
Jun 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migrated from dfinity/portal#6245 (moved to this repo per reviewer request — the spec is now hosted here).
What
public/references/ic.did:methodvariant →variant { get; head; post; put; delete; patch }.docs/references/ic-interface-spec/management-canister.md: documentPATCHalongsidePUT/DELETEas supported in non-replicated mode only (two paragraphs).docs/references/ic-interface-spec/changelog.md: new0.63.0 (TBD)entry.Why
PATCHis the last common REST verb missing afterPUT/DELETElanded (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;PATCHis additionally not guaranteed idempotent (RFC 5789 §2). The existingis_replicatedmachinery already covers it; no new mechanism is introduced.Notes
PATCHtohttp_request, rejected until rollout ic#10378.http_requestfor non-replicated calls portal#6245; that PR will be closed once this one merges.