Skip to content

Commit 349ac48

Browse files
committed
Restore emoji in code snippets ✅
1 parent e62f141 commit 349ac48

6 files changed

Lines changed: 21 additions & 21 deletions

File tree

docs/capabilities/http-fetch.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,15 @@ console.log('External API response:', data);
7676
Client-side fetch has different restrictions:
7777

7878
- **Domain limitation**: Can only make requests to your own webview domain
79-
- **Endpoint requirement**: All requests must target endpoints that start with /api
79+
- **Endpoint requirement**: All requests must target endpoints that start with /api/
8080
- **Authentication**: Handled automatically \- no need to manage auth tokens
8181
- **No external domains**: Cannot make requests to external domains from client-side code
8282
client/index.ts
8383

8484
```
8585
8686
const handleFetchData = async () => {
87-
// Correct: fetching your own webview's API endpoint
87+
// Correct: Fetching your own webview's API endpoint
8888
const response = await fetch("/api/user-data", {
8989
method: "GET",
9090
headers: {
@@ -96,10 +96,10 @@ const handleFetchData = async () => {
9696
console.log("API response:", data);
9797
};
9898
99-
// Incorrect: cannot fetch external domains from client-side
99+
// Incorrect: Cannot fetch external domains from client-side
100100
// const response = await fetch('https://external-api.com/data');
101101
102-
// Incorrect: endpoint must start with /api
102+
// Incorrect: Endpoint must start with /api/
103103
// const response = await fetch('/user-data');
104104
```
105105

docs/capabilities/server/http-fetch.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ Do not treat `/api/` endpoints as private. Any user who can load your app will b
8080

8181
```tsx title="client/index.ts"
8282
const handleFetchData = async () => {
83-
// Correct: fetching your own webview's API endpoint
83+
// Correct: Fetching your own webview's API endpoint
8484
const response = await fetch("/api/user-data", {
8585
method: "GET",
8686
headers: {
@@ -92,10 +92,10 @@ const handleFetchData = async () => {
9292
console.log("API response:", data);
9393
};
9494
95-
// Incorrect: cannot fetch external domains from client-side
95+
// Incorrect: Cannot fetch external domains from client-side
9696
// const response = await fetch('https://external-api.com/data');
9797
98-
// Incorrect: client fetch endpoint must start with /api/
98+
// Incorrect: Endpoint must start with /api/
9999
// const response = await fetch('/user-data');
100100
```
101101

versioned_docs/version-0.12/capabilities/http-fetch.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,15 @@ console.log('External API response:', data);
7676
Client-side fetch has different restrictions:
7777

7878
- **Domain limitation**: Can only make requests to your own webview domain
79-
- **Endpoint requirement**: All requests must target endpoints that start with /api
79+
- **Endpoint requirement**: All requests must target endpoints that start with /api/
8080
- **Authentication**: Handled automatically \- no need to manage auth tokens
8181
- **No external domains**: Cannot make requests to external domains from client-side code
8282
client/index.ts
8383

8484
```
8585
8686
const handleFetchData = async () => {
87-
// Correct: fetching your own webview's API endpoint
87+
// Correct: Fetching your own webview's API endpoint
8888
const response = await fetch("/api/user-data", {
8989
method: "GET",
9090
headers: {
@@ -96,10 +96,10 @@ const handleFetchData = async () => {
9696
console.log("API response:", data);
9797
};
9898
99-
// Incorrect: cannot fetch external domains from client-side
99+
// Incorrect: Cannot fetch external domains from client-side
100100
// const response = await fetch('https://external-api.com/data');
101101
102-
// Incorrect: endpoint must start with /api
102+
// Incorrect: Endpoint must start with /api/
103103
// const response = await fetch('/user-data');
104104
```
105105

versioned_docs/version-0.12/capabilities/server/http-fetch.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ Do not treat `/api/` endpoints as private. Any user who can load your app will b
8080

8181
```tsx title="client/index.ts"
8282
const handleFetchData = async () => {
83-
// Correct: fetching your own webview's API endpoint
83+
// Correct: Fetching your own webview's API endpoint
8484
const response = await fetch("/api/user-data", {
8585
method: "GET",
8686
headers: {
@@ -92,10 +92,10 @@ const handleFetchData = async () => {
9292
console.log("API response:", data);
9393
};
9494
95-
// Incorrect: cannot fetch external domains from client-side
95+
// Incorrect: Cannot fetch external domains from client-side
9696
// const response = await fetch('https://external-api.com/data');
9797
98-
// Incorrect: client fetch endpoint must start with /api/
98+
// Incorrect: Endpoint must start with /api/
9999
// const response = await fetch('/user-data');
100100
```
101101

versioned_docs/version-0.13/capabilities/http-fetch.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,15 @@ console.log('External API response:', data);
7676
Client-side fetch has different restrictions:
7777

7878
- **Domain limitation**: Can only make requests to your own webview domain
79-
- **Endpoint requirement**: All requests must target endpoints that start with /api
79+
- **Endpoint requirement**: All requests must target endpoints that start with /api/
8080
- **Authentication**: Handled automatically \- no need to manage auth tokens
8181
- **No external domains**: Cannot make requests to external domains from client-side code
8282
client/index.ts
8383

8484
```
8585
8686
const handleFetchData = async () => {
87-
// Correct: fetching your own webview's API endpoint
87+
// Correct: Fetching your own webview's API endpoint
8888
const response = await fetch("/api/user-data", {
8989
method: "GET",
9090
headers: {
@@ -96,10 +96,10 @@ const handleFetchData = async () => {
9696
console.log("API response:", data);
9797
};
9898
99-
// Incorrect: cannot fetch external domains from client-side
99+
// Incorrect: Cannot fetch external domains from client-side
100100
// const response = await fetch('https://external-api.com/data');
101101
102-
// Incorrect: endpoint must start with /api
102+
// Incorrect: Endpoint must start with /api/
103103
// const response = await fetch('/user-data');
104104
```
105105

versioned_docs/version-0.13/capabilities/server/http-fetch.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ Do not treat `/api/` endpoints as private. Any user who can load your app will b
8080

8181
```tsx title="client/index.ts"
8282
const handleFetchData = async () => {
83-
// Correct: fetching your own webview's API endpoint
83+
// Correct: Fetching your own webview's API endpoint
8484
const response = await fetch("/api/user-data", {
8585
method: "GET",
8686
headers: {
@@ -92,10 +92,10 @@ const handleFetchData = async () => {
9292
console.log("API response:", data);
9393
};
9494
95-
// Incorrect: cannot fetch external domains from client-side
95+
// Incorrect: Cannot fetch external domains from client-side
9696
// const response = await fetch('https://external-api.com/data');
9797
98-
// Incorrect: client fetch endpoint must start with /api/
98+
// Incorrect: Endpoint must start with /api/
9999
// const response = await fetch('/user-data');
100100
```
101101

0 commit comments

Comments
 (0)