Skip to content

Commit 4a6687d

Browse files
Oxyjunvy-tonpedrosousa
authored
[DO] Fetch wording update (cloudflare#24734)
* Wording update * Apply suggestions from code review Co-authored-by: Vy Ton <[email protected]> * Apply suggestions from PCX review Co-authored-by: Pedro Sousa <[email protected]> --------- Co-authored-by: Vy Ton <[email protected]> Co-authored-by: Pedro Sousa <[email protected]>
1 parent d5fedca commit 4a6687d

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/content/docs/durable-objects/api/base.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export class MyDurableObject extends DurableObject {
3333

3434
- This method can be `async`.
3535

36-
- This method exists for backward compatibility. New projects should [invoke RPC methods](/durable-objects/best-practices/create-durable-object-stubs-and-send-requests/#invoke-rpc-methods).
36+
- Durable Objects support [RPC calls](/durable-objects/best-practices/create-durable-object-stubs-and-send-requests/) as of a compatibility date greater or equal to [2024-04-03](/workers/configuration/compatibility-flags/#durable-object-stubs-and-service-bindings-support-rpc). Users should call RPC methods over `fetch()` if their application design does not follow HTTP request/response flow.
3737

3838
### `alarm`
3939

src/content/docs/durable-objects/best-practices/create-durable-object-stubs-and-send-requests.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ import { Render, Tabs, TabItem, GlossaryTooltip } from "~/components";
99

1010
## Invoking methods on a Durable Object
1111

12-
All new projects and existing projects with a compatibility date greater than or equal to [`2024-04-03`](/workers/configuration/compatibility-flags/#durable-object-stubs-and-service-bindings-support-rpc) should prefer to invoke [Remote Procedure Call (RPC)](/workers/runtime-apis/rpc/) methods defined on a <GlossaryTooltip term="Durable Object class">Durable Object class</GlossaryTooltip>. Legacy projects can continue to invoke the `fetch` handler on the Durable Object class indefinitely.
12+
All new projects and existing projects with a compatibility date greater than or equal to [`2024-04-03`](/workers/configuration/compatibility-flags/#durable-object-stubs-and-service-bindings-support-rpc) should prefer to invoke [Remote Procedure Call (RPC)](/workers/runtime-apis/rpc/) methods defined on a <GlossaryTooltip term="Durable Object class">Durable Object class</GlossaryTooltip>.
13+
14+
Projects requiring HTTP request/response flows or legacy projects can continue to invoke the `fetch()` handler on the Durable Object class.
1315

1416
### Invoke RPC methods
1517

0 commit comments

Comments
 (0)