diff --git a/doc/user_guide/img_1.png b/doc/user_guide/img_1.png new file mode 100644 index 000000000..b81a3cc96 Binary files /dev/null and b/doc/user_guide/img_1.png differ diff --git a/doc/user_guide/instructions_to_run_generated_code.md b/doc/user_guide/instructions_to_run_generated_code.md index ab20a2e5e..e9e4a2c3c 100644 --- a/doc/user_guide/instructions_to_run_generated_code.md +++ b/doc/user_guide/instructions_to_run_generated_code.md @@ -8,8 +8,8 @@ Choose your programming language/library from the list provided below to learn m - [Dart (http)](#dart-http) - [Dart (dio)](#dart-dio) - [Go (net/http)](#go-nethttp) -- [JavaScript (axios)](#javascript-axios) - [JavaScript (fetch)](#javascript-fetch) +- [JavaScript (axios)](#javascript-axios) - [node.js (JavaScript, axios)](#nodejs-javascript-axios) - [node.js (JavaScript, fetch)](#nodejs-javascript-fetch) - [Java (asynchttpclient)](#java-asynchttpclient) @@ -268,15 +268,72 @@ Here are the detailed instructions for running the generated API Dash code in ** ## Go (net/http) -TODO +### Prerequisites -## JavaScript (axios) +#### Install Go -TODO +- Windows and MacOS: +Download and install go from [official website](https://go.dev/doc/install). +- Linux: Install from your package manager or follow the [official source](https://go.dev/doc/install) + +#### Verify Installtion +```bash + go version +``` + +### Create a golang project + +```bash + go mod init example.com/api-example +``` + +### Run the code + +Create a new file named `main.go` and paste the generated code from `apidash`. +run the program with: + +```bash + go run main.go +``` ## JavaScript (fetch) -TODO +#### 1. Create a new HTML file `index.html`. Paste your generated code inside the ` + + +``` + +#### 2. Open Developer Tools +- Chrome: Right-click the page and select "Inspect" or press Ctrl+Shift+I (Windows/Linux) or Cmd+Option+I (macOS). +- Firefox: Right-click the page and select "Inspect Element" or press Ctrl+Shift+I (Windows/Linux) or Cmd+Option+I (macOS). +- Edge: Right-click the page and select "Inspect" or press F12 or Ctrl+Shift+I. + +#### 3. Navigate to the Network Tab +Click on the Network tab within the Developer Tools. +Refresh the page to capture all network activity. + +![img_1.png](img_1.png) + +## JavaScript (axios) + +Same steps as [JavaScript (fetch)](#javascript-fetch). + +Add the following to ``. +```html + +``` ## node.js (JavaScript, axios)