Skip to content

feat: allow PUT/DELETE in http_request for non-replicated calls#6199

Merged
mraszyk merged 4 commits into
masterfrom
fspreiss/http-request-put-delete-in-non-replicated-mode
Mar 10, 2026
Merged

feat: allow PUT/DELETE in http_request for non-replicated calls#6199
mraszyk merged 4 commits into
masterfrom
fspreiss/http-request-put-delete-in-non-replicated-mode

Conversation

@fspreiss

@fspreiss fspreiss commented Feb 19, 2026

Copy link
Copy Markdown
Contributor

Adapts the IC spec to allow PUT/DELETE for HTTP outcalls using http_request in non-replicated mode.

@github-actions github-actions Bot added the interface-spec Changes to the IC Interface Specification label Feb 19, 2026
@fspreiss fspreiss requested a review from mraszyk February 19, 2026 11:02

@mraszyk mraszyk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left one comment, otherwise LGTM

Comment thread docs/references/ic-interface-spec.md Outdated
@fspreiss fspreiss marked this pull request as ready for review February 19, 2026 15:32
@fspreiss fspreiss requested review from a team as code owners February 19, 2026 15:32

@mraszyk mraszyk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM I'll approve once the feature is rolled-out in prod to prevent accidental merging

@mraszyk mraszyk enabled auto-merge (squash) March 10, 2026 13:20
@mraszyk mraszyk merged commit 2cc3d2a into master Mar 10, 2026
6 checks passed
@mraszyk mraszyk deleted the fspreiss/http-request-put-delete-in-non-replicated-mode branch March 10, 2026 13:31
ggreif added a commit to ggreif/developer-docs that referenced this pull request Jun 19, 2026
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>
mraszyk added a commit to dfinity/developer-docs that referenced this pull request Jun 29, 2026
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

- Spec/docs change only. The corresponding runtime implementation is in
dfinity/ic#10378.
- The date in the changelog entry should be updated to the mainnet
rollout date before merging.
- Originally opened as dfinity/portal#6245; that PR will be closed once
this one merges.

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: mraszyk <31483726+mraszyk@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

interface-spec Changes to the IC Interface Specification

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants