Skip to content

Commit 2cd1094

Browse files
authored
Update instructions_to_run_generated_code.md
1 parent c564b12 commit 2cd1094

File tree

1 file changed

+36
-6
lines changed

1 file changed

+36
-6
lines changed

Diff for: doc/user_guide/instructions_to_run_generated_code.md

+36-6
Original file line numberDiff line numberDiff line change
@@ -300,19 +300,19 @@ Create a new file `index.html`
300300
<!DOCTYPE html>
301301
<html>
302302
<head>
303-
<title>Fetch Example</title>
303+
<title>Axios Example</title>
304304
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
305305
</head>
306306
<body>
307307
<script>
308-
// Paste your APIDash generated code here !!
308+
// Paste your API Dash generated code here !!
309309
</script>
310310
</body>
311311
</html>
312312
313313
```
314-
Make sure to paste the generated js code from api dash under the
315-
`<script>` tag.
314+
315+
Make sure to paste the generated js code from api dash under the `<script>` tag.
316316
317317
### 2. Test with Browser Developer Tools
318318
@@ -328,11 +328,41 @@ Navigate to network tab and refresh the page to see the requests and network act
328328
329329
## JavaScript (fetch)
330330
331-
Same instructions as [JavaScript (axios)](#javascript-axios) and delete the following line from the html code.
331+
The generated api code can be run in browser by using the code in an html file as demonstrated below:
332+
333+
### 1. Create the html file with generated code
334+
335+
Create a new file `index.html`
336+
332337
```html
333-
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
338+
<!DOCTYPE html>
339+
<html>
340+
<head>
341+
<title>Fetch Example</title>
342+
</head>
343+
<body>
344+
<script>
345+
// Paste your API Dash generated code here !!
346+
</script>
347+
</body>
348+
</html>
349+
334350
```
335351
352+
Make sure to paste the generated js code from api dash under the `<script>` tag.
353+
354+
### 2. Test with Browser Developer Tools
355+
356+
Open the `index.html` file in a modern browser and open devtools.
357+
358+
- **Chrome**: Right-click the page and select "Inspect" or press Ctrl+Shift+I (Windows/Linux) or Cmd+Option+I (macOS).
359+
360+
- **Firefox**: Right-click the page and select "Inspect Element" or press Ctrl+Shift+I (Windows/Linux) or Cmd+Option+I (macOS).
361+
362+
- **Edge**: Right-click the page and select "Inspect" or press F12 or Ctrl+Shift+I.
363+
364+
Navigate to network tab and refresh the page to see the requests and network activity.
365+
336366
## node.js (JavaScript, axios)
337367
338368
### 1.Install Node.js:

0 commit comments

Comments
 (0)