File tree Expand file tree Collapse file tree
version-0.12/capabilities
version-0.13/capabilities Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ Client-side fetch has different restrictions:
8484```
8585
8686const 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
Original file line number Diff line number Diff 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"
8282const 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 end with /api
9999// const response = await fetch('/user-data');
100100` ` `
101101
Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ Client-side fetch has different restrictions:
8484```
8585
8686const 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
Original file line number Diff line number Diff 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"
8282const 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 end with /api
9999// const response = await fetch('/user-data');
100100` ` `
101101
Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ Client-side fetch has different restrictions:
8484```
8585
8686const 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
Original file line number Diff line number Diff 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"
8282const 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 end with /api
9999// const response = await fetch('/user-data');
100100` ` `
101101
You can’t perform that action at this time.
0 commit comments