@@ -300,19 +300,19 @@ Create a new file `index.html`
300
300
<!DOCTYPE html>
301
301
<html>
302
302
<head>
303
- <title>Fetch Example</title>
303
+ <title>Axios Example</title>
304
304
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
305
305
</head>
306
306
<body>
307
307
<script>
308
- // Paste your APIDash generated code here !!
308
+ // Paste your API Dash generated code here !!
309
309
</script>
310
310
</body>
311
311
</html>
312
312
313
313
```
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.
316
316
317
317
### 2. Test with Browser Developer Tools
318
318
@@ -328,11 +328,41 @@ Navigate to network tab and refresh the page to see the requests and network act
328
328
329
329
## JavaScript (fetch)
330
330
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
+
332
337
```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
+
334
350
```
335
351
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
+
336
366
## node.js (JavaScript, axios)
337
367
338
368
### 1.Install Node.js:
0 commit comments